I have a strange problem inserting data to my database.
The script below works perfectly
<?php
printf ("Name =%s<br>",$name);
printf ("Style =%s<br>",$style);
printf ("Address=%s<br>",$address);
$db=mysql_connect("localhost","xxx","xxx");
mysql_select_db("xxx",$db);
$sql = "INSERT INTO xxx (name,style) VALUES ('$name','$style')";
mysql_query ($sql,$db);
?>
As soon as I change the query line to the following nothing works !!
$sql = "INSERT INTO xxx (name,style,address) VALUES ('$name','$style','$address')";
$Address does contain valid data, I have tested that by printing it at the start of the script.
This is even the exact SQL script which MySQL Admin generates when I do it manually and that DOES work.
It seems to be limiting me to inserting only two fields at a time, if I submit $name & $address it works, add $style to the query and nothing again !!
Can anyone please help !!
This is driving me nuts !
Thanks
Phil.