title: Alert in PHP not working inside if
body: <p>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:</p>
  
  <pre><code>if(empty($response)){ 
      //SOME ACTIONS
      echo '&lt;script type='text/javascript'&gt; alert("Message´s 1st line\nMessage´s 2nd line");&lt;/script&gt;';
      //SOME ACTIONS
      header('Location: SOMEWEBSITE');                                
  }else{ 
     //ANOTHER ACTION
  } 
  </code></pre>
  
  <p>All actions works fine except for the alert. I tried on different browsers but the alert doesnt appear.</p>
  
  <p>Sorry for my english </p>
  
  <p>Thank you all.</p>