Jump to content

Athmaus

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Athmaus's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. got it to work <?php session_start(); $pass = strtolower($_POST['password']); $name = strtolower($_POST['username']); if ($name == "test" && $pass == "test") { $_SESSION['myuser'] = $name; session_write_close(); header("Refresh: 0; url='select.php'"); } else { // invalid login, so go back ... header("Refresh: 0; url='index.php'"); } ?>
  2. Hmmm it appears no matter what i type in the form it always fails....for some reason my form isn't picking up the user/pass i inputted.....
  3. I cahnged the loginscript to this <?php session_start(); $pass = strtolower($_POST['password']); $name = strtolower($_POST['username']); if($name == "test" && $pass == "test"){ $_SESSION['myuser']=$name; header ("location: select.php"); } else{ // invalid login, so go back ... header ("location: index.php"); } ?> still no luck
  4. Hello, I created a simple login script, taht has a hard coded user/pass. Yet for some reason it will not work, keeps redirecting to the main login page Here is the code Login Page <table width='400' border='0' align='center' cellpadding='0' cellspacing='0'> <tr> <td>UserName:</td> <td><form action="loginscript.php" method="post"> <input name="username" type="text" size="10"></td> </tr> <tr> <td>Password:</td> <td><input name="password" type="password" size="10"></td> </tr> <tr> <td colspan='2' align='center'><input name="Submit" type="submit" value="Submit"></form></td> </tr> </table> Login Script <?php session_start(); $pass = strtolower($_POST['password']); $name = strtolower($_POST['username']); if($name == "test" && $pass == "test"){ header ("location: select.php"); } else{ // invalid login, so go back ... header ("location: index.php"); } ?> Select.php <?php session_start(); if(isset($_SESSION['myuser'])){ } else{ header ("location: index.php"); } ?> ANy ideas why it is not working. It doesnt seem like it is going through the login on the loginscript as all it does is redirect back to index page over and over again
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.