I want to put an alert inside an if (in a php document) with other actions. The other actions works fine but not the alert. Can anybody help me?. This is where the alert is:
if(empty($response)){
//SOME ACTIONS
echo '<script type='text/javascript'> alert("Message´s 1st line
Message´s 2nd line");</script>';
//SOME ACTIONS
header('Location: SOMEWEBSITE');
}else{
//ANOTHER ACTION
}
All actions works fine except for the alert. I tried on different browsers but the alert doesnt appear.
Sorry for my english
Thank you all.