BarrieHie Posted February 25, 2007 Share Posted February 25, 2007 Hello Everyone, I've got several db's on my server so this isn't entirely new but I'm choking here!!! Can anyone else see something I"m missing??? I've checked the data types and gone so far as to trying to only insert one 'field' at a time but it's not working at all!!! The user data table is inserting fine, nothing happening in subscribers. Thanks people Barrie $sql = "INSERT INTO subscribers (Key, Fname, Lname, Addr1, Addr2, City, State, Zip, Phone, Fax, Email, Location, Startdate, Bnames, Billing, Active, Tickettotal, Rate, Amountdue) VALUES ('$key', '$fname', '$lname', '$addr1', $addr2', '$city', '$state', '$zip', '$phone', '$fax', '$email', '$location', '$startdate', '$bnames', '$billing', '$active', '$tickettotal', '$rate', '$amountdue')"; $result = mysql_query($sql); $sql = "INSERT INTO users VALUES ('$key', '$bnames', '$pworduser', '$fnameuser', '$locationuser', '$accessleveluser')"; $result = mysql_query($sql); Link to comment https://forums.phpfreaks.com/topic/40065-solved-insert-into-pulling-my-hair-out/ Share on other sites More sharing options...
AndyB Posted February 25, 2007 Share Posted February 25, 2007 edit $result = mysql_query($sql); so that you see any errors that exist ... $result = mysql_query($sql) or die("Error: ". mysql_error(). " with query ". $sql); Link to comment https://forums.phpfreaks.com/topic/40065-solved-insert-into-pulling-my-hair-out/#findComment-193788 Share on other sites More sharing options...
BarrieHie Posted February 25, 2007 Author Share Posted February 25, 2007 That helped with it showing me the error!!! I found it on the second go around. Missing the first ' to demark the $addr2. :-) Thank You, :-) Barrie Link to comment https://forums.phpfreaks.com/topic/40065-solved-insert-into-pulling-my-hair-out/#findComment-193818 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.