title: How to use javascript using PHP?
body: <p>Scenario:</p>
  
  <p>I created a filtering using <code>IF ELSE</code> where when the user click BOX A AND BOX B... Then assuming the BOX A is already full, after the user hit the "SAVE BUTTON", a confirmation message will display saying that... <em>"The Box you chosen is already full. Do you want to save the other items?"</em></p>
  
  <p>Here's my Code:</p>
  
  <pre><code>&lt;?php
  //else if......
      else if($box== "BOX A" &amp;&amp; $row[item]  == "100")
      {
  
          echo "&lt;script type='text/javascript'&gt;";
          echo "var r=confirm('The Box you chosen is already full. Do you want to save the other items?')";
          echo "if (r==true){";
          echo "alert('You pressed OK!')}";
          echo "else{";
          echo "alert('You pressed Cancel!')}";
          echo "&lt;/script&gt;";
  
      }
  ?&gt;
  </code></pre>
  
  <p>I have a problem with the code and when I try to trace it using <code>echo "enter here";</code>
  its always stop after the program read this code</p>
  
  <pre><code>  echo "&lt;script type='text/javascript'&gt;";
  </code></pre>
  
  <p>Then it will jump it in here:</p>
  
  <pre><code> echo "&lt;/script&gt;";
  </code></pre>
  
  <p>RESULT: </p>
  
  <p>its not displaying the pop up message ... So all I need is to display the pop up message and I dont know why, why its not displaying... There is no button involve for the displaying of confirmation message...It will just pass by in if else and then it will prompt up if the user wants to continue the saving if one of the box is already full if not he/she will press the cancel...</p>
  
  <p>NOTE:
  I'm only a beginner for PHP and Javascript..</p>
  
  <p>Thank you in advance.</p>