php - How can I redirect after a form submission? -
this question has answer here:
- how make redirect in php? 21 answers
currently coding post command php pushes data e-mail. i'm looking find way redirect afterward server has sent e-mail url.
<?php $email_from = 'my@e-mail.co.uk'; $email_subject = "new form submission"; $email_body = "you have received new insurance enquiry $firstname $lastname $gender born on $dobday $dobmonth $dobyear $smoker after $insurtype want cover $cover,000 $years years $meandpartner contact information: mobile: $mobile telephone: $landline e-mail: $email street: $street city: $city postcode: $postcode partner details: $pfirstname $plastname $pgender $pdobday $pdobmonth $pdobyear $psmoker " ?> <?php $to = "my@email.co.uk"; $headers = "from: $email_from \r\n"; $headers .= "reply-to: my@email.co.uk"; mail($to,$email_subject,$email_body,$headers); ?>
you can use header :
header('location: mypage.php');
more informations here : http://php.net/manual/en/function.header.php
Comments
Post a Comment