Jump to content

[SOLVED] How can I?


think-digitally

Recommended Posts

Hi. I have a contact form. When the form is submitted, I want it to forward to a sent page.

 

Can anyone show me how I would do this with the code.

 

Heres the code

 

<?php
if(isset($_POST['submit'])) {

$to = "[email protected]"; 
$subject = "Print Requet - David Clapp Photography";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$printname = $_POST['printname'];
$message = $_POST['message'];
$option = $_POST['radio'];
$option2 = $_POST['radio2'];
$dropdown = $_POST['drop_down'];

$body = "From: $name_field\n E-Mail: $email_field\n Photo Name: $printname\n Postage: $option\n Payment: $option2\n Print Size: $dropdown\n Message:\n $message\n";

echo "Data has been submitted to $to!";
mail($to, $subject, $body);

} else {
echo "Error, Please try again later";
}
?>

Link to comment
https://forums.phpfreaks.com/topic/109974-solved-how-can-i/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.