![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' inDear All
I am trying to create a form in which users can update their prefrences, Address, Phone no., contact prefrence etc. The code I am using is below. The code is very scrapy but I have been trying many things. I am trying to check whether a field in a form contains any data if so update the db. I am trying to stop the update function from empting my db. I have a feeling that I am accessing an array variable incorrectly, but am at a lose as to how to fix. Any help would be appreciated. Best Regards Phil Error: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/sites/site112/web/user_prefs9.php on line 66 PHP Code:
|
|
#2
|
||||
|
||||
|
I didn't go through all your code, so this may eliminate the error or it may not:
PHP Code:
By the way, didn't you ask something similar a few days ago, or was that someone else? :-) __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#3
|
|||
|
|||
|
Yeah sorry I did.
Please accept my appolgises I had totally forgotten that I had done. I am kind of getting brain melt down. Thank you for your help again. Phil ![]() |
|
#4
|
|||
|
|||
|
I am having a similar problem with my code on update.
I am receiving Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' whenever I attempt to execute the script. PHP Code:
If I remove my sql statement from my code the rest of the page works fine and it displays all variables they should be. NOTE: The script is no where near final, there are other things I am gonna change, I just need this error to disappear. Thanks in Advance Mike |
|
#5
|
|||
|
|||
|
Surround your variables like
PHP Code:
it should work. |
|
#6
|
|||
|
|||
|
Thanks, that worked on removing the error.
However now my script is throwing my DB Login Error Here is the code for the alert its throwing up. PHP Code:
So that tells me my script is having a problem writing to my database. Have any ideas based on the code I posted in my previous post. Thanks in Advance Mike |
|
#7
|
|||
|
|||
|
Which line? first or second.
Also seperate your field groups with commas |
|
#8
|
|||
|
|||
|
Also do you know anything about working with dates with Mysql and Php?
|
|
#9
|
|||
|
|||
|
thanks for the help, I think that took care of my problem.
What are you trying to do with dates? Do you want to manipulate a TimeStamp? Mike |
|
#10
|
|||
|
|||
|
Essentially I am trying to display FTSE 100 Stock prices on my page.
I have decided to create a Mysql table which I will update daily. The primary key for this table is the date, currently a datetime field. So I want to take todays date in php and pass it to Mysql in the form of a Sql query to return the prices. I also what to select the previous days values to perform a change calculation. I have a test page I am playing with at the mo, I just can't get it to return values, no errors just no matches. Thus I must assume that date format is incorrect!! PHP Code:
Any suggestions? |
Recent GIDBlog
First week of IA training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The