Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Home</title>
- <!-- Internal Style Sheet -->
- <style type="text/css">
- #update
- {
- margin-left: auto;
- margin-right: auto;
- border-collapse:collapse;
- }
- #update td, #update th
- {
- font-size:1em;
- border:1px solid #104667;
- padding:3px 7px 2px 7px;
- }
- #update th
- {
- font-size:1.1em;
- text-align:left;
- padding-top:5px;
- padding-bottom:4px;
- background-color:#104667;
- color:#ffffff;
- }
- </style>
- </head>
- <body>
- <?php
- // mysql Variables //
- $mysql_localhost = "local_host";
- $mysql_username = "db_username";
- $mysql_database = "db_name";
- $mysql_password = "db_password";
- // Connects to mysql datatbase //
- mysql_connect("$mysql_localhost", "$mysql_username", "$mysql_password") or die(mysql_error());
- mysql_select_db("$mysql_database") or die(mysql_error());
- }
- // Selects all data from table
- $qry = "SELECT * FROM add_update";
- $res = mysql_query($qry);
- $member = mysql_fetch_assoc($res);
- ?>
- <table id="update">
- <th>
- <?php echo $member['title']; ?>
- </th>
- <tr>
- <td>
- <?php echo $member['content']; ?>
- </td>
- </tr>
- </table>
- </body>
- <html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement