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>
- <body>
- <h1>Scotia Books Edit Search</h1>
- <?php
- $username=$_POST['username'];
- $password=$_POST['password'];
- @ $db = mysql_connect('127.0.0.1', 'root', '');
- if (!$db)
- {
- echo 'Error: mysql_error() Could not connect to database. Please try again later.';
- exit;
- }
- mysql_select_db('surf');
- $query = "select * from customers where username = '$username' and password = '$password'";
- $result = mysql_query($query);
- $num_results = mysql_num_rows($result);
- $row = mysql_fetch_array($result);
- extract($row);
- if ($num_results !=0)
- {
- echo "<p>Hi there</p>";
- echo "<form action='changedetails.php' method='post'>
- Username
- <input type='text' name='username' maxlength='13' size='13' value = '$username'></br>
- Password
- <input type='password' name='password' maxlength='60' size='30' value = '$password'></br>
- <input name='Continue' type='submit' value='Change details'>
- </form>";
- echo "<form action='orderentry.php' method='post'>
- Customerno
- <input type='text' name='customerno' maxlength='13' size='13' value = '$customerno'></br>
- <input name='Continue' type='submit' value='Continue'>
- </form>";
- }
- else
- {echo "Incorrect try again!!";}
- ?>
- <p>
- If you would like to change your details please <a href='changedetails.php'>click here</a>
- </p>
- </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement