Jump to content

Sending Form Information


grucker

Recommended Posts

Essentially, you just have to add the mail function last, after the submission to your database. See if you can work it out from here to suit your code:-


  $result=MYSQL_QUERY("INSERT INTO villagehall (id, day, month, year,date,starttime, endtime, club, room, who, phone, email, message, book)".
     "VALUES ('NULL', '$day', '$month', '$year', '$date', '$starttime', '$endtime', '$club1', '$room' , '$who1',  '$phone1' , '$email1' , '$message1', '$book')")or die( "<p><span style=\"color: red;\">Unable to select table</span></p>");  
mysql_close(); 

mail( $email, "Village Hall booking", "$day/$month/$year $starttime to $endtime\r\n$room $book\r\n$club\r\n\r\n$replymsg", "From: $admin" );

header( "Location: $thankyouurl" );		
}

?>

 

The above is just part of the code. It's old mysql; I have updated my page to mysqli which is recommended now, but the code is a little bit more complicated as more than one parameter is often needed.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...