Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <link href="mainstyle.css" rel="stylesheet" type="text/css">
- <title>News</title>
- <?php
- $time = time() + 60 + 60 + 24 + 7;
- // Connect to the database.
- // mysql_connect("localhost", "irishsto_derp", "irishsto") or die(mysql_error());
- // mysql_select_db("irishsto_blog") or die(mysql_error());
- mysql_connect("localhost", "root", "") or die(mysql_error());
- mysql_select_db("jamiegrant_blog") or die(mysql_error());
- ?>
- <body class="body">
- <div id="wrappernews"><!--Opens Wrapper DIV-->
- <div id="bannernews"></div>
- <div id="navigation">
- <ul id="nav">
- <li><a href="index.html">Home</a></li>
- <li><a href="news.html">News</a></li>
- <li><a href="game.html">Game</a></li>
- <li><a href="art.html">Art</a></li>
- <li><a href="contacts.html">Contact</a></li>
- </ul>
- </div>
- <div id="navigationagain">
- <ul id="nav">
- <li><a href="leveldesign.html">LevelDesign</a></li>
- <li><a href="renders.html">Renders</a></li>
- </ul>
- </div>
- <!--/////////////////////////////////////////////////// -->
- <!--///////////////////////////////////////////////////-->
- <div id="news">
- <?php
- // Select all from myblog in decending order of id
- $sql = mysql_query("SELECT * FROM myblog ORDER BY id DESC");
- while($row = mysql_fetch_array($sql))
- {
- $title = $row['headline'];
- $article = $row['smalltext'];
- $author = $row['author'];
- $date = $row['date'];
- $id = $row['id'];
- echo "<Strong> $title </Strong>";
- echo "<br />";
- echo $article;
- echo "<br />";
- echo "Posted by<Strong> $author</Strong> on the <Strong>$date</Strong>";
- echo "<br />";
- echo "<br />";
- }
- ?>
- </div>
- </div>
- <!--Closes Wrapper DIV-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement