Advertisement
Guest User

Untitled

a guest
May 26th, 2017
594
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.23 KB | None | 0 0
  1. <?
  2. $Request = $_POST['Request'];
  3. $Username = $_POST['Username'];
  4. $Password = $_POST['Password'];
  5. $Email = $_POST['Email'];
  6. $Gender = $_POST['Gender'];
  7. $Country = $_POST['Country'];
  8. if($Request == "Login"){
  9.     //connect to db, see if its right, if so send back
  10.     //print "login=true"
  11.     //else
  12.     //print "login=false"
  13.     if( $Username == 'Solar' && $Password == 'bob'){
  14.         print "login=true";
  15.     } else {
  16.         print "login=false";
  17.     }
  18. }
  19. elseif($Request == "Register"){ //Better practice to join elseif up
  20.     //connect to db, check to see if its a valid registration, if so send back
  21.     //print "Register=true";
  22.     //else
  23.     //print "Register=false";
  24.     if($Username == 'Solar' && $Password == 'bob' && $Email == 'r.crean@hotmail.co.uk' && $Gender == 'Male' && $Country == 'Usa'){
  25.         print "register=true";
  26.     }else{
  27.         print "register=false";
  28.     }
  29. }
  30. elseif($Request == "Reset"){ //Better practice to join elseif up
  31.         //check to make sure if it is the right combo, if it is then send and email and
  32.         //print "Reset=true";
  33.         //else
  34.         //print "Reset=false";
  35.         if($Username == 'Solar' && $Email == 'r.crean@hotmail.co.uk'){
  36.             print "reset=true"; //You forgot the semi colon
  37.         }else{
  38.             print "reset=false"; //You forgot the semi colon
  39.         }
  40. }
  41. else {
  42. }
  43. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement