Re: [PHP] [php] INSERT INTO

2002-12-17 Thread Marek Kilimajer
For 40 variables I would recomend keeping them in a single array and then loop the array: $vars['part1']='something'; $vars['part2']='something else'; foreach($vars as k => $v) { $vars[$k]=addslashes($v); } John Taylor-Johnston wrote: Yes I'm reading the FM :) http://www.php.net/manual/en/

Re: [PHP] [php] INSERT INTO

2002-12-17 Thread Jason Wong
On Tuesday 17 December 2002 15:12, John Taylor-Johnston wrote: > I'm particularily concerned aboute single quotes. How do I escape them? > Should I? > > Here is what I think is right. > > --snip-- > $myconnection = mysql_connect($server,$user,$pass); > mysql_select_db($db,$myconnec

[PHP] [php] INSERT INTO

2002-12-16 Thread John Taylor-Johnston
Yes I'm reading the FM :) http://www.php.net/manual/en/ref.mysql.php I should know this. How will I PHP this SQL into my MySQL table? INSERT INTO testals VALUES ($part1, $part2, $part3, $part4); I'm particularily concerned aboute single quotes. How do I escape them? Should I? Here is what I thi