[PHP] Re: [PHP-DB] Re: [PHP] $_POST in MySQL query issue...

2003-10-16 Thread Peter Beckman
On Fri, 17 Oct 2003, BAO RuiXian wrote: > I see you can achieve this by two ways: > > 1. Take out all the inside quotes (single or double) like the following: > > $sql="insert into $table set Name = $_POST[elementName]"; This is bad. Using no quotes MAY work, but it is considered a

RE: [PHP] $_POST in MySQL query issue...

2003-10-16 Thread Jake McHenry
Adam Reiswig wrote: > Greetings to all. I am trying for the life of me to place a $_POST[] > variable in my MySQL query. I am running the latest stable > versions of > PHP, MySQL and Apache 2 on my Win2kPro machine. My > register_globals are > set to off in my php.ini. My code I am attempting c

Re: [PHP] $_POST in MySQL query issue...

2003-10-16 Thread BAO RuiXian
Adam Reiswig wrote: $table="elements"; $sql="insert into $table set Name = '$elementName'"; This works with register_globals set to on. But, I want to be able to turn that off. My code then, I am guessing, be something as follows: $table="elements"; $sql="insert into $table set Name = '$_POS

[PHP] $_POST in MySQL query issue...

2003-10-16 Thread Adam Reiswig
Greetings to all. I am trying for the life of me to place a $_POST[] variable in my MySQL query. I am running the latest stable versions of PHP, MySQL and Apache 2 on my Win2kPro machine. My register_globals are set to off in my php.ini. My code I am attempting create is basically as follow