title: How can I change label's text of one page from another php page?
body: <p>The problem is: I'm building a simple log-in php page, the user should enter the username and password and click "Login" button. This button submits the entered values to another php page that deals with the database and makes sure that the user is registered. Now if he/she is not registered, then the page return to the log-in page, but before that, it changes some label's text to inform the user that the entered username or password are wrong. </p>
  
  <p>My problem is that: the second php page don't have access to the first one's elements! </p>
  
  <p>Here are the codes I used till now!
  Second php page: called LoginSubmit.php:</p>
  
  <pre><code>if($row = mysqli_fetch_array($result))
  {
      echo "&lt;meta http-equiv='refresh' content='0;URL=../Home.php'&gt;";
  }
  else
  {
      echo"&lt;script type='text/javascript'&gt;";
  echo"parent.document.getElementById('FailureText').innerHTML = 'Yours user name or password are wrong!!';";
  echo "&lt;/script&gt;";
  echo "&lt;meta http-equiv='refresh' content='0;URL=../Login.php'&gt;";
  }
  </code></pre>
  
  <p>And at the first page (called Login.php), the label is defined in the form like:</p>
  
  <pre><code>&lt;td align="center" class="LiteralProb" colspan="2" style="color:Red;"&gt;
      &lt;label ID="FailureText"&gt;&lt;/label&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>It's empty and seems non-existing label, but when log-in error occur, a message to the user should be displayed on it! </p>
  
  <p>Any help, Please! :) ??</p>