![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Troubled
Join Date: May 2009
Posts: 71
OS: Computer = WXP, Server = linux w/ php 5
|
PHP help - please help!
i am trying to track scores for rock band, like www.scorehero.com
i want it to be viewable like this ![]() just using a mysql DB/php 5 please help, i have spent 60+ hours on this |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#4 (permalink) |
|
Design Team Member
|
Re: PHP help - please help!
This is real basic stuff...how many tutorials did you look at/try in those 60 hours?
My favorite PHP/MySQL tutorial: http://www.freewebmasterhelp.com/tutorials/phpmysql
__________________
Free Resources PC Protection - Comodo Firewall | AVG Anti-Virus | WinPatrol | Ad-Aware | Spybot S&D | SpywareBlaster |Web Design/Programming - KompoZer (Editor) | Paint.NET (Graphic) | GIMP+GIMPShop (Graphic) | FileZilla (FTP Client) | Free Hosting | |
|
|
|
|
|
#5 (permalink) | |
|
Troubled
Join Date: May 2009
Posts: 71
OS: Computer = WXP, Server = linux w/ php 5
|
Re: PHP help - please help!
Quote:
i am begging you, i am a complete noob at php PLEEEEZE!!!!!!!!!!!!! |
|
|
|
|
|
|
#7 (permalink) |
|
Design Team Member
|
Re: PHP help - please help!
This is a support forum, not a free labor forum :P I get paid to do that stuff, why would I do it for free? Anyways you'll never learn anything from it and you can't always get people to do free work on your site. You need to be able to fix and update it on your own, unless you plan on paying someone to help or know someone that is willing to do it for free quite frequently (I guarantee that kind of offer runs thin when they're doing your site for you all the time).
Take a look at the article and take an honest try at making the script and then we'll take a look at it for you and help you along.
__________________
Free Resources PC Protection - Comodo Firewall | AVG Anti-Virus | WinPatrol | Ad-Aware | Spybot S&D | SpywareBlaster |Web Design/Programming - KompoZer (Editor) | Paint.NET (Graphic) | GIMP+GIMPShop (Graphic) | FileZilla (FTP Client) | Free Hosting | |
|
|
|
|
|
#8 (permalink) | |
|
Troubled
Join Date: May 2009
Posts: 71
OS: Computer = WXP, Server = linux w/ php 5
|
Re: PHP help - please help!
Quote:
<form action="scores.php" method="post"> Song: <input type="text" name="first"><br> Score: <input type="text" name="last"><br> Player Name: <input type="text" name="phone"><br> Percent: <input type="text" name="mobile"><br> <input type="Submit"> </form> |
|
|
|
|
|
|
#9 (permalink) |
|
Design Team Member
|
Re: PHP help - please help!
Okay, and how does scores.php look?
__________________
Free Resources PC Protection - Comodo Firewall | AVG Anti-Virus | WinPatrol | Ad-Aware | Spybot S&D | SpywareBlaster |Web Design/Programming - KompoZer (Editor) | Paint.NET (Graphic) | GIMP+GIMPShop (Graphic) | FileZilla (FTP Client) | Free Hosting | |
|
|
|
|
|
#10 (permalink) |
|
Troubled
Join Date: May 2009
Posts: 71
OS: Computer = WXP, Server = linux w/ php 5
|
Re: PHP help - please help!
<?
$Song=$_POST['Song']; $Score=$_POST['Score']; $Player Name=$_POST['Player Name']; $Percent=$_POST['Percent']; mysql_connect(XXXXXXXX,$XXXXXXXXx,$XXXXXXXXX); @mysql_select_db($database) or die( "Unable to select database"); $query = "INSERT INTO contacts VALUES ('','$Song','$Score','$Player Name','$'Percent')"; mysql_query($query); mysql_close(); ?> Last edited by carsey; 06-16-2009 at 06:53 PM. |
|
|
|
|
|
#12 (permalink) |
|
Moderator, TSF Articles
|
Re: PHP help - please help!
You going to need to add a 'id' tag to your form.
HTML Code:
<form action="scores.php" method="post"> Song: <input type="text" name="first" [b]id="name"[/b]><br> Score: <input type="text" name="last" [b]id="last"[/b]><br> Player Name: <input type="text" name="phone" [b]id="phone"[/b]><br> Percent: <input type="text" name="mobile" [b]id="mobile"[/b]><br> <input type="Submit"> </form> This is done by: PHP Code:
You also need to connect to the database: PHP Code:
Then insert data into the DB PHP Code:
PHP Code:
Then to echo the data you need to use the $fetch and the name of the row you want to display. PHP Code:
|
|
|
|
|
|
#13 (permalink) |
|
Moderator, TSF Articles
|
Re: PHP help - please help!
You going to need to add a 'id' tag to your form.
HTML Code:
<form action="scores.php" method="post"> Song: <input type="text" name="first" id="name"><br> Score: <input type="text" name="last" id="last"><br> Player Name: <input type="text" name="phone" id="phone"><br> Percent: <input type="text" name="mobile" id="mobile"><br> <input type="Submit"> </form> This is done by: PHP Code:
You also need to connect to the database: PHP Code:
Then insert data into the DB PHP Code:
PHP Code:
Then to echo the data you need to use the $fetch and the name of the row you want to display. PHP Code:
Last edited by carsey; 06-16-2009 at 06:12 PM. |
|
|
|
|
|
#14 (permalink) | |
|
Troubled
Join Date: May 2009
Posts: 71
OS: Computer = WXP, Server = linux w/ php 5
|
Re: PHP help - please help!
Quote:
could you help me write the actual php script html is easy, i just need help w/ mysql/php end so do i goto my mysql datbase create a table named " scores" - insert song, score, player name, and percent as a table's contents -and what do i enter for a value |
|
|
|
|
|
|
#15 (permalink) |
|
Moderator, TSF Articles
|
Re: PHP help - please help!
You will need to set the database up and make all the columns or fields you are going to need.
Its always best to make a id field which is set to auto increment when a new record is added. There are many good guides out there which will help you. Ive given you a very good idea of how the script will need to be produced so you should be albe to google or use the link Redcore gave you. |
|
|
|
|
|
#16 (permalink) | |
|
Troubled
Join Date: May 2009
Posts: 71
OS: Computer = WXP, Server = linux w/ php 5
|
Re: PHP help - please help!
Quote:
|
|
|
|
|
|
|
#17 (permalink) |
|
Design Team Member
|
Re: PHP help - please help!
Then you're old enough to search for topics with Google
![]() How to make an auto incrementing ID column: http://trebleclick.blogspot.com/2009...hpmyadmin.html In basic database design, you want every row to be unique in some way so you can manipulate each row without affecting other rows. This is typically done through a row ID column that is unique.
__________________
Free Resources PC Protection - Comodo Firewall | AVG Anti-Virus | WinPatrol | Ad-Aware | Spybot S&D | SpywareBlaster |Web Design/Programming - KompoZer (Editor) | Paint.NET (Graphic) | GIMP+GIMPShop (Graphic) | FileZilla (FTP Client) | Free Hosting | |
|
|
|
![]() |
| Thread Tools | |
|
|