Abdi Posted January 20, 2013 Share Posted January 20, 2013 <?php session_start(); $per_page = 10; $query = mysql_query("SELECT * FROM 'bio'"); echo $pages = mysql_result($pages_query, 0); if ($_SESSION ['username']) echo "<right>Welcome, ".$_SESSION['username']."!<br><a href='logout.php'>Log out</a><br><a href='bio.php'>Post an Ad!</a></right>"; else die("You must be logged in!"); $connect = mysql_connect("localhost","root","4shizzle"); //connect to server mysql_select_db("textbooks"); //query the database $query = mysql_query("SELECT * FROM bio"); echo "<table border=1 cellpadding=10> <tr> <th>Date</th> <th>Class</th> <th>Book</th> <th>Price</th> <th>Email</th> </tr>"; while($rows = mysql_fetch_array($query)): $class = $rows['class']; $title = $rows['title']; $email = $rows['email']; $price = $rows['price']; $date = $rows['date']; $newDate = date("M-d", strtotime($date)); echo "<tr>"; echo "<td>" . $newDate . "</td>"; echo "<td>" . $class . "</td>"; echo "<td>" . $title . "</td>"; echo "<td>" . $price . "</td>"; echo "<td>". $email . "</td>"; echo "</tr>"; endwhile; ?> Quote Link to comment https://forums.phpfreaks.com/topic/273380-pagination-help/ Share on other sites More sharing options...
trq Posted January 20, 2013 Share Posted January 20, 2013 You forgot to post a question. Quote Link to comment https://forums.phpfreaks.com/topic/273380-pagination-help/#findComment-1407049 Share on other sites More sharing options...
Kristoff1875 Posted January 20, 2013 Share Posted January 20, 2013 Also might want to hide your username and password... Quote Link to comment https://forums.phpfreaks.com/topic/273380-pagination-help/#findComment-1407076 Share on other sites More sharing options...
cpd Posted January 20, 2013 Share Posted January 20, 2013 Quote Link to comment https://forums.phpfreaks.com/topic/273380-pagination-help/#findComment-1407087 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.