Código PHP:
<?php
$from= "$email";
$ok = false;
$name = trim($_POST['name']);
$lastname = trim($_POST['lastname']);
$email = trim($_POST['email']);
$to = $_POST['to'];
$msg = $_POST['text'];
$subject = $name.' '.$lastname;
if ((!empty($name)) && (!empty($lastname)) && (!empty($email)) && (!empty($to)) && (!empty($text)) && (eregi("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$]", $email)))
{ $ok= true;}
else
{ $ok= false;}
if ($ok= true)
{mail($to, $subject, $msg, 'From:' .$email);
header ('http://www.thechicmagazine.com/contact_sent.php');
}
?>
Quise usar header(...) para redireccionar a "contact_sent.php" al hacer submit pero me sale este mensaje...
Código HTML:
Warning: Cannot modify header information - headers already sent by (output started at /home/content/66/7966166/html/w_thechic/contact_script.php:9) in /home/content/66/7966166/html/w_thechic/contact_script.php on line 28
Alguna ayuda?
gracias