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! 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. 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 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. 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 Try putting a die; or exit; after each header(); 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 On 12/11/2012 at 4:37 AM, computermax2328 said: $annq = mysql_query($ann $connection); Missing your , there between the arguments. Link to comment https://forums.phpfreaks.com/topic/271851-second-set-of-eyes/#findComment-1398684 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.