computermax2328 Posted December 11, 2012 Share Posted December 11, 2012 Hey Everyone, Could someone find the error in this? My log isnt working and I can't stare at it anymore. The include file has nothing wrong with it. It is my functions file. Can't spell functions without FUN! include("../fun/fun.php"); if ($_POST['announce']) { $first = mysql_real_escape_string($_POST['first']); $last = mysql_real_escape_string($_POST['last']); $email = mysql_real_escape_string($_POST['email']); $ann = "INSERT INTO members ('first', 'last', 'email') VALUES ('$first', '$last', '$email')"; $annq = mysql_query($ann $connection); if ($annq) { header("Location:../pages/annoucements.php"); } else { echo "Query failed " . mysql_error(); } } if ($_POST['contact']) { $first = mysql_real_escape_string($_POST['first']); $last = mysql_real_escape_string($_POST['last']); $email = mysql_real_escape_string($_POST['email']); $line = mysql_real_escape_string($_POST['line']); $con = "INSERT INTO contact ('first', 'last', 'email', 'comment') VALUES ('$first', '$last', '$email', '$line')"; $conq = mysql_query($con $connection); if ($conq) { header("Location:../pages/contact.php"); } else { echo "Query failed " . mysql_error(); } } else { header("Location:../pages/index.php"); } Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/271851-second-set-of-eyes/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 11, 2012 Share Posted December 11, 2012 Your forgot to tell us what error or symptom you saw in front of you that leads you to believe your code isn't working. Without that information, since we are not standing right next to you, it's a little hard to narrow down the dozen different things that could be wrong with any piece of code to the one or two actual things to check. Quote Link to comment https://forums.phpfreaks.com/topic/271851-second-set-of-eyes/#findComment-1398679 Share on other sites More sharing options...
computermax2328 Posted December 11, 2012 Author Share Posted December 11, 2012 (edited) I wish that my error log was working properly to tell me that. All I got was an HTTP 500 error. HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request. Edited December 11, 2012 by computermax2328 Quote Link to comment https://forums.phpfreaks.com/topic/271851-second-set-of-eyes/#findComment-1398680 Share on other sites More sharing options...
MDCode Posted December 11, 2012 Share Posted December 11, 2012 (edited) Try putting a die; or exit; after each header(); Edited December 11, 2012 by SocialCloud Quote Link to comment https://forums.phpfreaks.com/topic/271851-second-set-of-eyes/#findComment-1398681 Share on other sites More sharing options...
kicken Posted December 11, 2012 Share Posted December 11, 2012 $annq = mysql_query($ann $connection); Missing your , there between the arguments. Quote Link to comment https://forums.phpfreaks.com/topic/271851-second-set-of-eyes/#findComment-1398684 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.