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

2003-10-17 Thread Socheat
, October 16, 2003 6:45 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-WIN] Re: $_POST in MySQL query issue... > $sql="insert into $table set Name = '$_POST["elementName"]'"; The problem with this is that you need to use curly braces arou

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

2003-10-16 Thread Lang Sharpe
> $sql="insert into $table set Name = '$_POST["elementName"]'"; The problem with this is that you need to use curly braces around the variable being substituted in the string. Also use single quotes around the array index. $sql="insert into $table set Name = '{$_POST['elementName']}'"; See the

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

2003-10-16 Thread DvDmanDT
$sql="insert into $table set Name = '".$_POST["elementName"]."'"; or even better: $sql="insert into ".$table." set Name = '".$_POST["elementName"]."'"; But the method both Jake and Bao suggested will also work (temporary var)... -- // DvDmanDT MSN: [EMAIL PROTECTED] Mail: [EMAIL PROTECTED] "Adam