Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>*~~~~mY FrIeNsTeR~~~~~*</title>
- </head>
- <body>
- <?php
- $con = mysql_connect("localhost","root","");
- if (!$con)
- {
- die('Could not connect: ' . mysql_error());
- }
- mysql_select_db("personal", $con);
- $result = mysql_query("SELECT * FROM friends");
- ?>
- <table width="923" border="1">
- <tr>
- <td width="32"><strong>ID</strong></td>
- <td width="216"><strong>NAME</strong></td>
- <td width="171"><strong>ADDRESS</strong></td>
- <td width="117"><strong>PHONE NO. </strong></td>
- <td width="176"><strong>EMAIL ADDRESS </strong></td>
- <td width="136"><strong>WEB ADDRESS </strong></td>
- <td width="45"></td>
- </tr>
- <?php
- while($row = mysql_fetch_array($result))
- {
- echo "<tr>";
- echo "<td align='center'>".$row['id']."</td>";
- echo "<td>".$row['name']."</td>";
- echo "<td>".$row['address']."</td>";
- echo "<td>".$row['phone']."</td>";
- echo "<td>". $row['email']."</td>";
- echo "<td>". $row['web']."</td>";
- echo "<td><p><a href='edit.php?id=$row[id]'>edit</a></p><p><a href='delete.php?id=$row[id]'>delete</a></p></td>";
- echo "</tr>";
- echo "<br />";
- }
- mysql_close($con);
- ?>
- </tr>
- </table>
- <br><br><br>
- <center><a href="index.html"><input name="ADD" type="button" value="ADD NEW FRIEND"></a></center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment