Hey there,
I was using this CSS 3 and jQuery form tutorial to build a form for my website.
[url]http://youhack.me/2010/07/22/create-a-fancy-contact-form-with-css-3-and-jquery/
(the PHP is near the bottom)
It uses Ajax and Php to do the backend of the form, but in the tutorial there is not a $to. The form doesn’t work because it has nowhere to go.
Can someone please help me modify this code ‘so I can include a send to email address:
[code=html]
<?php
$name = $_POST[‘name’];
$email = $_POST[’email’];
$web = $_POST[‘web’];
$body = $_POST[‘text’];
if (!empty($name) & !empty($email) && !empty($body)) {
$body = “Name:{$name}nnWebsite :{$web}nnComments:{$body}”;
$send = mail($email, ‘Contact Form Submission’, $body, “From: {$email}”);
if ($send) {
echo ‘true’; //if everything is ok,always return true , else ajax submission won’t work
}
}
?>