[PHP] 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] Re: [PHP-DB] $_POST in MySQL query issue...

2003-10-19 Thread Eugene Lee
On Sun, Oct 19, 2003 at 02:51:33PM -0400, Adam Reiswig wrote: : : 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 =

[PHP] 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] 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.

[PHP] 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] 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