Re: Adding a record to a database [message #175104 is a reply to message #175100] |
Mon, 15 August 2011 13:45 |
JohnT
Messages: 16 Registered: April 2011
Karma:
|
Junior Member |
|
|
On Mon, 15 Aug 2011 05:35:37 -0700, Charles wrote:
>
>
> ('$_POST[Make]','$_POST[Model]','$_POST[Edition]','$_POST
Start here - you can't put complex variables in a string unless you quote
them like:
('{$_POST[Make]}','{$_POST[Model]}','{$_POST[Edition]}',
However - you should not be putting these directly into the database.
You should first validate in the input, and then quote the strings to
make them database safe:
('".mysql_real_escape_string($_POST[Make])."',
JohnT
|
|
|