Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <?php $userquery ?>'s Profile
- </head>
- <body>
- <?php
- //check for a form submission
- if (isset($_GET['username'])) {
- $username = $_GET['username'];
- }
- mysql_connect("localhost","root","","socialnetwork") or die ("Could not connect to the server!");
- $userquery = mysql_query("SELECT Username FROM users WHERE socialnetwork") or die ("The query could not be completed. Please try again");
- if (mysql_num_rows($userquery) != 1) {
- die ("That username is not valid. Please try again!");
- }
- while($row = mysql_fetch_array($userquery, MYSQL_ASSOC)) {
- $username = $row['username'];
- }
- ?>
- <h2><?php echo $userquery; ?>'s Profile</h2><br />
- <table>
- <tr><td>Username:</td><td><?php echo $username; ?></td></tr>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement