![]() |
|
#1
|
|||
|
|||
Parse error: parse error, unexpected T_STRINGHello,
I am slowly learning to use PHP for the website that I am putting together. So, please understand that I am a newbee to PHP, and MySql. I am also creating this script from other bits and pieces from other scripts, so that might be part of my problem. What I am attempting to accomplish here, is to update a variable by adding one to it, and then sending it back to the database to be updated there, before going to the website that the user selected. This is the error that I am getting... Parse error: parse error, unexpected T_STRING in /home/content/R/i/c/RichardAKnox/html/ace.php on line 43 This is my script: PHP Code:
I used to have a few echo statements in this script to verify that certain aspects of the script worked. But, as soon as I added the Line 43 portion, then the script stopped working, and gave me the errors listed. Thanks for any help, Richard Last edited by LuciWiz : 19-Nov-2006 at 08:44.
Reason: Please insert your Php code between [php] & [/php] tags
|
|||
|
#2
|
||||
|
||||
Re: Parse error: parse error, unexpected T_STRINGThe query that you want to run should be stored as a string...
PHP Code:
Look at how you have the SELECT query above in quotations... you need the same thing for the update query... including actually calling the mysql_query() function call to actually query the db. __________________
If practice makes perfect and nobody's perfect... why practice? Homepage: http://www.treywhite.com Blog: http://www.treywhite.com/blog.php Web Design Company: http://www.ewebproductions.com |
|
#3
|
|||
|
|||
Re: Parse error: parse error, unexpected T_STRINGIm getting an error like that also, and can not figure out why i am also new to PHP and Mysql. The line that i am having the error on is the one that says VALUES ('".$_POST['username']."', '".$_POST['password']."')";
thanks for any help PHP Code:
|
|
#4
|
||||
|
||||
Re: Parse error: parse error, unexpected T_STRINGBring the assignment to $insert to the next line.
If you look back at the formatted code in your post, you should see the problem, it looks like it is part of the comment. __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
Recent GIDBlog
Master?s Degree by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Apologies In Advance Parse error: parse error, unexpected T_STRING, expecting T_VARI | sph2005 | MySQL / PHP Forum | 11 | 17-Jul-2006 09:28 |
| Parse Error | vigilantweather | MySQL / PHP Forum | 3 | 21-Feb-2006 12:24 |
| Parse Error | vigilantweather | MySQL / PHP Forum | 6 | 04-Feb-2006 13:15 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The