Hi everyone, this is my first time using php.
i have made a basic contact form and hosted it, (http://www.prowinduk.com/contact/index.html)
how do i make it so after the form has been sent, it resets the form and shows a message saying "message sent"
please can some one help, i am using dreamweaver cs5.
sorry if this has been mentioned in the past as i searched all over but could not find a answer.
any help/advise would be usehull, thanks
below is the text code stuff:
<?php $EmailFrom = "
[email protected]"; $EmailTo = "
[email protected]"; $Subject = "online form"; $Name = Trim(stripslashes($_POST['name'])); $Email = Trim(stripslashes($_POST['email'])); $Tel = Trim(stripslashes($_POST['tel'])); $Message = Trim(stripslashes($_POST['message'])); $Pcode = Trim(stripslashes($_POST['pcode'])); // validation $validationOK=true; if (!$validationOK) { echo "please check your details"; header("Location: http://prowinduk.com/contact/send_email.php"); exit; } // prepare email body text $Body = ""; $Body .= "Full Name: "; $Body .= $Name; $Body .= "\n"; $Body .= "Telephone #: "; $Body .= $Tel; $Body .= "\n"; $Body .= "E-mail: "; $Body .= $Email; $Body .= "\n"; $Body .= "Address: "; $Body .= $Message; $Body .= "\n"; $Body .= "Postcode: "; $Body .= $Pcode; $Body .= "\n"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); // redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"1;URL=index.php\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"1;URL=index.php\">"; } ?>