I am trying to redirect page after user registers i created two radio button paynow and pay later in user register i want to redirect when the user clicks paynow user should register and redirect to custom url and if the user select pay later user should register and send custom url to user for future payment here is the code i used
$myemail=$_POST['email'];
$first_name="firstname";
$last_name="lastname";
echo "<script>window.location.href='http://ift.tt/1S1W6zE'&email=$myemail'</script>";
$to="test@gmail.com";
$message = "
Please payus for registering account http://ift.tt/1S1W6zE'&email=$email'
";
// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'To: madu<test@gmail.com>' . "\r\n";
$headers .= 'From: madu<test@gmail.com>' . "\r\n";
// Mail it
mail($to, $subject, $message, $headers);
}
}
add_filter( 'registration_redirect', 'wpse_19692_registration_redirect' );
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire