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. 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. 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(*) 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? Link to comment https://forums.phpfreaks.com/topic/153072-syntax-error-help/#findComment-803983 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.