jamesxg1 Posted April 7, 2009 Share Posted April 7, 2009 $sql = "INSERT INTO `settings` (comapnyname, `companyurl`, `companyslogan`, `companytitle`, `companycopyr`) VALUES($companyname, '$companyurl', '$companyslogan', '$companytitle', '$companycopyr')"; mysql_query($sql) or die(mysql_error()); header('Location: MenuControl.php?form=order'); i have a syntax error but i cant find it for love of god. Quote Link to comment https://forums.phpfreaks.com/topic/153072-syntax-error-help/ Share on other sites More sharing options...
Maq Posted April 7, 2009 Share Posted April 7, 2009 $companyname needs single quotes. Quote Link to comment https://forums.phpfreaks.com/topic/153072-syntax-error-help/#findComment-803978 Share on other sites More sharing options...
jamesxg1 Posted April 7, 2009 Author Share Posted April 7, 2009 $companyname needs single quotes. WOW!!, i feel really dumb !, i looked at that script about 5 times to see what was wrong with it and that was it !! lol thanks mate your a star(*) Quote Link to comment https://forums.phpfreaks.com/topic/153072-syntax-error-help/#findComment-803981 Share on other sites More sharing options...
Maq Posted April 7, 2009 Share Posted April 7, 2009 Didn't mysql_error() tell you something similar? Quote Link to comment https://forums.phpfreaks.com/topic/153072-syntax-error-help/#findComment-803983 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.