Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html><head>The Moray College Surf Shop </head><body><h1>Member Search Results</h1>
- <?php
- session_start();
- $username=@$_POST['username'];
- $password=@$_POST['password'];
- $db = mysql_connect('127.0.0.1', 'root', '') or die(mysql_error());
- mysql_select_db('surf');
- $query = "select * from customers where username = '$username' and password = '$password'";
- $result = mysql_query($query);
- $num_results = mysql_num_rows($result);
- if (!$num_results > 0) {
- echo "<form action='loginshop.php' method='post'>
- Username
- <input type='text' name='username' maxlength='13' size='13'></br>
- Password
- <input type='text' name='password' maxlength='60' size='30'></br>
- <input name='Continue' type='submit' value='Continue'>
- </form>";
- } else {
- echo "If you would like to change your details please <a href='register.php?a=change'>click here</a>";
- $_SESSION['info'] = mysql_query($query);
- }
- ?>
- </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement