Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Two things that could have gone wrong.</p> <p><strong>First</strong>, <code>This function has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.</code> from the <a href="http://php.net/manual/en/function.session-register.php" rel="nofollow">documentation</a>. So delete these lines from checkLogin.php:</p> <blockquote> <p><strike>session_register("FirstName");</p> <p>session_register("LastName"); </strike></p> </blockquote> <p>And write this instead (note the added <a href="http://php.net/manual/es/function.session-start.php" rel="nofollow">session_start()</a> ):</p> <pre><code>session_start(); $_SESSION['FirstName'] = $FirstName; $_SESSION['LastName'] = $LastName; </code></pre> <p><strong>Second</strong> (might be derived from the first, might not be), the logic in inc_header_User.php could be wrong for your purposes, try changing it to:</p> <pre><code>session_start(); if(!isset($_SESSION['FirstName'])) { $FirstName = ''; echo "Hello"; }else{ $FirstName = $_SESSION['FirstName']; } </code></pre> <p><strong>Other notes:</strong> Is it an error, a notice or a warning? It doesn't look fatal actually, echoing a non-set variable will not likely kill your whole app.</p> <p>You are prone to MySQL injection, change the first lines to this:</p> <pre><code>$FirstName = mysql_real_escape_string($_POST['FirstName']); $LastName = mysql_real_escape_string($_POST['LastName']); </code></pre> <p>As already suggested, try using MySQLi or PDO instead of mysql_* functions for new code.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload