html - Not redirecting after submitting the form in php -


after submitting form not able redirect successful page.

<?php ob_start(); ?> <title>feel free send thoughts</title> <?php $to         ='sanaullahkhan81@gmail.com'; $name       =$_post['name']; $email      =$_post['email']; $message    =$_post['message']; $subject    ='enquiry using contact page from:  '.$name ; $actul_msg  ='a message contact page'. "\n".'name: '.$name."\n".' eamil:  '.$email."\n" .' enquiry: '.$message; mail($to,$subject,$actul_msg); header('location: sucessfully_submitted.html'); ob_end_clean(); ?> 

here's a link

link success page here's a link

how manual says: http://www.php.net/manual/en/function.header.php

remember header() must called before actual output sent, either normal html tags, blank lines in file, or php.

<?php  $to         ='sanaullahkhan81@gmail.com'; $name       =$_post['name']; $email      =$_post['email']; $message    =$_post['message']; $subject    ='enquiry using contact page from:  '.$name ; $actul_msg  ='a message contact page'. "\n".'name: '.$name."\n".' eamil:  '.$email."\n" .' enquiry: '.$message; mail($to,$subject,$actul_msg); header('location: http://www.yourdomain.com/sucessfully_submitted.html');  ?> 

Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -