[help] Error trying to add to database
Posted: Wed Jan 06, 2010 12:57 pm
abushahin wrote:
Hey to insert data into db you need to create a form then let php insert it for you, to retrieve data you'll need to create a form to retrieve it for you. you can have a look at hows its done here
<<http://abushahin.eu/tutorials/insertdata.php>>
Hey, hope you can help me. If not, thanks anyway.
I checked out the website you sent me and set everything up but I am still getting a DB error. This is what I have so far. I have a login for users (as of right now I have to manually add the information to create a new member in the members table, which is fine at the moment). It checks the username and password, connects on success. I want them to be able to change the information in the database, so as they progress, they can change it. I did the tutorial you sent me and I get this error;
Parse error: syntax error, unexpected ';' in /home/content/96/4742196/html/add.php on line 9
Line 9 is;
mysql_query("INSERT INTO members VALUES('$charname')" or die ('Error, INSERT to users query failed');
I changed everything to charname on the html/php side and whatnot.
And ideas?
Hey to insert data into db you need to create a form then let php insert it for you, to retrieve data you'll need to create a form to retrieve it for you. you can have a look at hows its done here
<<http://abushahin.eu/tutorials/insertdata.php>>
Hey, hope you can help me. If not, thanks anyway.
I checked out the website you sent me and set everything up but I am still getting a DB error. This is what I have so far. I have a login for users (as of right now I have to manually add the information to create a new member in the members table, which is fine at the moment). It checks the username and password, connects on success. I want them to be able to change the information in the database, so as they progress, they can change it. I did the tutorial you sent me and I get this error;
Parse error: syntax error, unexpected ';' in /home/content/96/4742196/html/add.php on line 9
Line 9 is;
mysql_query("INSERT INTO members VALUES('$charname')" or die ('Error, INSERT to users query failed');
I changed everything to charname on the html/php side and whatnot.
And ideas?