Simple Login System Issues
<p>So I'm learning how to make a simple login system for a website I'm making and I'm getting this error.</p>

<p>Notice: Use of undefined constant myusername - assumed 'myusername' in /home/dkitterm/public_html/index.php on line 4</p>

<p>These are lines 3-6.</p>

<pre><code>    session_start();
    if(!session_is_registered(myusername)){
     header("location: main_login.php");
    }
</code></pre>

<p>This is my check login page as well.</p>

<pre><code>        &lt;?php

    $host="localhost";
    $username="dkitterm";
    $password="";
    $db_name="";
    $tbl_name="members";

    //connect to server and db
    mysql_connect("$host", "$username", "$password") or die("Server Down");
    mysql_select_db("$db_name") or die("cannot select DB");

    //username and password sent from form
    $myusername=$_POST['myusername'];
    $mypassword=$_POST['mypassword'];

    //debunk
    $myusername = stripslashes($myusername);
    $mypassword = stripslashes($mypassword);
    $myusername = mysql_real_escape_string($myusername);
    $mypassword = mysql_real_escape_string($mypassword);

    //encrypt password
    $encrypted_mypassword=md5($mypassword);


    $sql="SELECT * FROM members WHERE login='$myusername' and password='$encrypted_mypassword'";
    $result=mysql_query($sql);

    // Mysql_num_row is counting table row
    $count=mysql_num_rows($result);
    // If result matched $myusername and $mypassword, table row must be 1 row

    if($count==1){
    // Register $myusername, $mypassword and redirect to file                 "login_success.php"
    session_register("myusername");
    session_register("mypassword"); 
    header("location: index.php");
    }
    else {
    echo "Wrong Username or Password";
    }
    ?&gt;
</code></pre>
