Re: note 7897 added to Variables from outside PHP
| From: | Zak Greant | Date: | Fri, 18 Aug 2000 20:23:32 +0000 |
| Subject: | Re: note 7897 added to Variables from outside PHP | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-2497@lists.php.net to get a copy of this message | ||
At 08:17 PM 8/18/00 +0000, gittewj@hhknet.dk wrote:
Hello. Maybe there's a note about this somewhere nut I haven't been able to loacte it. I have made this form with the purpose to update a database with the input data. But how do you put the $variables into your SQL-statement?? you can't write: $sql = "UPDATE members SET name=$newname WHERE name=$oldname" or can youThe manual notes are not the place for asking support questions. Please make sure to read the instructions at http://www.php.net/manual/add-note.php before adding another note. Go to http://www.php.net/support.php to find out how to get help for your support questions. Regarding your question, you will need to quote your variables: i.e. $sql = "UPDATE members SET name='$newname' WHERE name='$oldname'" - zak