Advertisement
littleswany

PHP Code

Mar 3rd, 2014
247
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $username = $_GET['Username'];
  3. $password = $_GET['Password'];
  4. $con=mysqli_connect("localhost","root","root","the_tech");
  5. // Check connection
  6. if (mysqli_connect_errno())
  7.  {
  8.  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  9.  }
  10. $qz = "SELECT id FROM members where username='".$username."' and password='".$password."'" ;
  11. $qz = str_replace("\'","",$qz);
  12. $result = mysqli_query($con,$qz);
  13. while($row = mysqli_fetch_array($result))
  14.  {
  15.  echo $row['id'];
  16.  }
  17. mysqli_close($con);
  18. ?>
Advertisement
RAW Paste Data Copied
Advertisement