Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Link Directory</title>
- <style type="text/css">
- <!--
- body {
- background-image: url(http://example.com/img/bg.jpg);
- background-repeat: repeat;
- }
- -->
- </style>
- </head>
- <body><center>
- <?php
- $con=mysqli_connect("localhost","root","","dir");
- // Check connection
- if (mysqli_connect_errno())
- {
- echo "Failed to connect to MySQL: " . mysqli_connect_error();
- }
- $result = mysqli_query($con,"SELECT * FROM link");
- echo '<table width="684" border="1" align="center" bgcolor="#FFFFFF">
- <tr>
- <th width="103">ID</th>
- <th width="311">Page Title</th>
- <th width="248">Click For Details/Longer Description</th>
- </tr>';
- while($row = mysqli_fetch_array($result))
- {
- echo "<tr>";
- echo "<td height="23">" . $row['id'] . "</td>";
- echo "<td>" . $row['title'] . "</td>";
- echo "<td><a href=\"link.php?id=" . $row['id'] . "\">Click Here</a></td>";
- echo "</tr>";
- }
- echo "</table>";
- mysqli_close($con);
- ?></center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement