Thanks to all. Single quotes around '$value' did the trick.
Robbie
CPT John W. Holmes wrote:
From: "Robbie Staufer" <[EMAIL PROTECTED]>
I'm writing an application that will display the contents of a db in the
browser, including the db-assigned id number. The user can then enter
the id numb
Quotes missing around $value. Try instead:
mysql_query( "UPDATE tablename SET {$name} LIKE '{$value}' WHERE ID={$id}")
Of course, even though the code does not show, you have properly validated
user input before firing this query...
HTH
Ignatius
_
- Original Message -
From: "Robbie Staufer" <[EMAIL PROTECTED]>
> I'm writing an application that will display the contents of a db in the
> browser, including the db-assigned id number. The user can then enter
> the id number in a form and the browser will display the record
> corresponding to that id number, with t
put some single quotes around $value in your SQL statement.
-Original Message-
From: Robbie Staufer [mailto:[EMAIL PROTECTED]
Sent: 24 September 2003 16:21
To: [EMAIL PROTECTED]
Subject: [PHP-DB] update db with variables
Hi,
I'm writing an application that will display the contents of a