hi all
i want to show an alert box and then redirect page to another location through php code but its not working as needed.
As i cannot use PHP HEADER LOCATION because i m using echo before header. so i have to use javascript but through
PHP.
But If i use any one of them then they BOTH work fine like
or
but how can i get them both to work together through php.
vineet
i want to show an alert box and then redirect page to another location through php code but its not working as needed.
As i cannot use PHP HEADER LOCATION because i m using echo before header. so i have to use javascript but through
PHP.
Code:
if(mail($to,$subject,$body,$headers))
{
echo "<script language='javascript'>";
echo "alert('order email sent')";
echo "window.location='manage_orders.php?choice=PENDING'";
echo "</script>";
}
Code:
if(mail($to,$subject,$body,$headers))
{
echo "<script language='javascript'>";
echo "alert('order email sent')";
echo "</script>";
}
Code:
if(mail($to,$subject,$body,$headers))
{
echo "<script language='javascript'>";
echo "window.location='manage_orders.php?choice=PENDING'";
echo "</script>";
}
vineet
Comment