Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include_once("db.php");
- $myusername = $_GET['u'];
- $passwordHash = sha1(strip_tags($_GET['p']));
- $sql="SELECT * FROM members WHERE username='$myusername' and password='$passwordHash'";
- $rs = mysql_query($sql) or die ("Query failed");
- // Mysql_num_row is counting table row
- $numofrows = mysql_num_rows($rs);
- // If result matched $myusername and $mypassword, table row must be 1 row
- if ($numofrows==1) {
- // Access Granted Begin Whisper update procedure
- ECHO 'Access Granted';
- $sql="SELECT * FROM members WHERE username='$myusername' and password='$passwordHash'";
- $rs = mysql_query($sql) or die ("Query failed");
- // Mysql_num_row is counting table row
- $numofrows = mysql_num_rows($rs);
- // If result matched $myusername and $mypassword, table row must be 1 row
- if($numofrows==1)
- {
- // Run check for messages
- $query = "SELECT `from`, `too`, `message` FROM `outbox` WHERE from='$myusername'";
- $sqlinbox = mysql_query($query);
- $outbox = mysql_fetch_array($sqlinbox);
- $sender = $outbox['from'];
- $reciever = $outbox['too'];
- $message = $outbox['message'];
- echo $message;
- } else {
- ECHO 'User Dose Not Esist';
- exit;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement