title: PHP same page echoing (using die funct.)
body: <pre><code>    &lt;?php                    //filename signup.php
      ob_start();
   include('dat.php');
      if (!empty($_POST)){
  
  
          if ($pass!="d41d8cd98f00b204e9800998ecf8427e" OR $user!="") {       // 1
              $result=mysql_query($sql);
              if(mysql_error()) {
                  die('Sorry, this username already exists');                 // 2
              }
          } else {
          echo "Please enter the Password";
          }
      }
  
      ob_end_flush();
      ?&gt;
  
  &lt;html&gt;
  &lt;body&gt;
  &lt;form name="form1" method="post" action="signup.php"&gt;                &lt;!--3--&gt;
  Username&lt;input name="myusername" type="text" id="myusername" /&gt;
  Password&lt;input name="mypassword" type="text" id="mypassword" /&gt;
  e-mail&lt;input name="email" type="text" id="email" /&gt;
  &lt;input type="submit" name="Submit" value="Login" /&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is a sign up page (All the mysql details are missing here, they are included in dat.php) . If there is ny error , it is displayed in the same page.<br>
  problem 1 : [ //1 ] what is the operator for OR , in this case I have used the condition for if the pass or user is blank,but the OR is not working neither || , used in javascript.<br>
  problem 2 : [ //2 ] if die is used , then the statement is printed in the new window , but I want it to appear in the same window...I also used echo, it worked but I feel like i am missing the main function of 'die' by using 'echo'.<br>
  problem 3 : [ <code>&lt;!--3--&gt;</code> ] how can I replace signup.php as action to something like SERVER_PAGE or whatever...  </p>