Jump to content

Second Set Of Eyes


computermax2328

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.