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

2003-10-21 Thread Lang Sharpe
The reason curly braces are needed are because you are putting an array element into a string. Consider.. $sBlah = 'blah'; echo $sBlahfoo$sBlahfoo; PHP will attempt to echo the variable $sBlahfoo twice. if you use echo {$sBlah}foo{$sBlah}foo; you have told php explicitly when to look for

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

2003-10-19 Thread Adam Reiswig
A couple of days ago I placed a post regarding using the $_POST[] variable in an insert sql query. Both $sql=insert into $table set Name = '.$_POST['elementName'].'; and $sql=insert into $table set Name = '{$_POST['elementName']}'; worked perfectly. Thanks to everyone for your help. My

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

2003-10-19 Thread Adam Reiswig
A couple of days ago I placed a post regarding using the $_POST[] variable in an insert sql query. Both $sql=insert into $table set Name = '.$_POST['elementName'].'; and $sql=insert into $table set Name = '{$_POST['elementName']}'; worked perfectly. Thanks to everyone for your help. My

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

2003-10-19 Thread John W. Holmes
Adam Reiswig wrote: My question now is regarding the curly brackets in the 2nd example. Can anyone describe why using the curly brackets works and/or how php processes them. I have read quite a bit about php and never come accross thier use in this way. Thanks again.

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

2003-10-19 Thread Lee Doolan
Adam == Adam Reiswig [EMAIL PROTECTED] writes: Adam A couple of days ago I placed a post regarding using the Adam $_POST[] variable in an insert sql query. Both Adam $sql=insert into $table set Name = Adam '.$_POST['elementName'].'; and $sql=insert into $table Adam set Name

[PHP-DB] $_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

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

2003-10-16 Thread Peter Beckman
On Thu, 16 Oct 2003, Adam Reiswig wrote: $sql=insert into $table set Name = '$_POST[elementName]'; Unfortunately this and every other combination I can think of, combinations of quotes that is, does not work. I believe the source of the problem is the quotes within quotes within quotes. I