Hi Everyone,
I have a POST form which collects data in text input fields and sends them to php file for string joining. Then, the complete is to be inserted into MySQL. If I equate $grplist to only one of the $npaa, $nxxa, or $blocka then it wall works fine. However, the moment I try to join all three below with .= or + or . Mysql just gives me errors that it's wrong syntax for MySQL. I can't believe I can't joing two strings together. I even tried to change these variables to strings first using (string) but it was no use. Can someone please tell me what is wrong with $grplist variable?
$npaa = "('$_POST[anpa]')";
$nxxa = "('$_POST[anxx]')";
$blocka = "('$_POST[ablock]')";
$grplist = $npaa;
$grplist .= $nxxa;
$grplist .= $blocka;
$sql="REPLACE INTO findmefollow
(grpnum, strategy, grptime, grppre, grplist, annmsg_id, postdest, dring, needsconf, remotealert_id, toolate_id, ringing, pre_ring) VALUES
('$_POST[grpnum]','ringall','$_POST[grptime]','$_POST[grppre]',$grplist,'0','$_POST[postdest]','','','0','0','Ring','$_POST[pre_ring]')";
Thanks a lot