FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Adding a record to a database
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Adding a record to a database [message #175104 is a reply to message #175100] Mon, 15 August 2011 13:45 Go to previous messageGo to previous message
JohnT is currently offline  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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PHP 4 vs 5 timings
Next Topic: Re: ftp with win-filenames with chr#32 ?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 29 17:16:24 GMT 2024

Total time taken to generate the page: 0.05918 seconds