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.
Expand|Select|Wrap|Line Numbers
- 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>";
- }
Expand|Select|Wrap|Line Numbers
- if(mail($to,$subject,$body,$headers))
- {
- echo "<script language='javascript'>";
- echo "alert('order email sent')";
- echo "</script>";
- }
Expand|Select|Wrap|Line Numbers
- if(mail($to,$subject,$body,$headers))
- {
- echo "<script language='javascript'>";
- echo "window.location='manage_orders.php?choice=PENDING'";
- echo "</script>";
- }
vineet