Try putting single quotes around your variables in your update statement 
instead of the escaped double quotes, they are easier to read. 

Also, were you wanting to update all entries in that table to the same, 
c_name, s_addy, city, state, zip and phone?  If not, you will need to 
add 'where id=$id' (or something along those lines) to your update 
statement.  Otherwise, the way you have it now, it will update every row in 
your database to the same values for the listed fields.  

jas <[EMAIL PROTECTED]> said:

> Ok what is wrong with this sql statement?
> $sql = "UPDATE $table_name SET
> c_name="$c_name",s_addy="$s_addy",city="$city",state="state"zip="zi
> p",phone="$phone"";
> The error I recieve is as follows
> Warning: Unexpected character in input: '' (ASCII=92) state=1 in
> /path/to/wwwdemo_change.php3 on line 22
> Parse error: parse error in /path/to/wwwdemo_change.php3 on line 22
> I have looked on at the update function and it states I can use
> the SET under UPDATE for multiple fields separated by a , and it is not
> working... Any insight would be great.
> Thanks in advance,
> Jas
> -- 
> PHP Database Mailing List (
> To unsubscribe, visit:


PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to