Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $Request = $_POST['Request'];
- $Username = $_POST['Username'];
- $Password = $_POST['Password'];
- $Email = $_POST['Email'];
- $Gender = $_POST['Gender'];
- $Country = $_POST['Country'];
- if($Request == "Login"){
- //connect to db, see if its right, if so send back
- //print "login=true"
- //else
- //print "login=false"
- if( $Username == 'Solar' && $Password == 'bob'){
- print "login=true";
- } else {
- print "login=false";
- }
- }
- elseif($Request == "Register"){ //Better practice to join elseif up
- //connect to db, check to see if its a valid registration, if so send back
- //print "Register=true";
- //else
- //print "Register=false";
- if($Username == 'Solar' && $Password == 'bob' && $Email == 'r.crean@hotmail.co.uk' && $Gender == 'Male' && $Country == 'Usa'){
- print "register=true";
- }else{
- print "register=false";
- }
- }
- elseif($Request == "Reset"){ //Better practice to join elseif up
- //check to make sure if it is the right combo, if it is then send and email and
- //print "Reset=true";
- //else
- //print "Reset=false";
- if($Username == 'Solar' && $Email == 'r.crean@hotmail.co.uk'){
- print "reset=true"; //You forgot the semi colon
- }else{
- print "reset=false"; //You forgot the semi colon
- }
- }
- else {
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement