SHARE
TWEET

Untitled

a guest May 22nd, 2017 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. include("login.php");
  3.  
  4. $host="localhost";
  5. $username ="root";
  6. $password="";
  7. $db_name="users";
  8. $tbl_name="users_info";
  9.  
  10. mysql_connect("$host","$username",$password)or die(mysql_error());
  11. mysql_select_db("$user_info")or die("mysql_error());
  12.  
  13. // you should really filter these
  14. $myusername=$_GET['FirstName'];
  15. $mylastname=$_GET['LastName'];
  16.  
  17. // I don't see where you actually verify the username and password....
  18. // I mean, you got the correct sql for it, however, you don't actually verify the
  19. // results anywhere.
  20. $sql="Select * FROM $tbl_name WHERE username='$username' and password='$mylastname'";
  21. $result=mysql_query($sql)";
  22.  
  23. session_register("myusername");
  24. session_register("mypassword");
  25. }
  26. else {
  27. echo "$mysql_error()";
  28. }
  29. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top