almightyegg Posted April 3, 2007 Share Posted April 3, 2007 I've put a // Blah thing to show you where has problems and what they are if($page > 1){ $prev = ($page - 1); echo "<a href='{$_SERVER['PHP_SELF']}?f=$f&page=1'>First</a> "; echo "<a href='{$_SERVER['PHP_SELF']}?f=$f&page=$prev'>Prev</a> "; } // end if // build the links to the 2 previous and 2 next pages for($i = ($page - 2); $i <= ($page + 2); $i++){ // only make a link if the prev/next is a valid page number if (($i >= 1) && ($i <= $total_pages)) { echo ($page == $i) ? "[$i] " : "<a href='{$_SERVER['PHP_SELF']}?f=$f&page=$i'>$i</a> "; } } if($page < $total_pages){ $next = ($page + 1); echo "<a href='{$_SERVER['PHP_SELF']}?f=$f&page=$next'>Next</a> "; echo "<a href='{$_SERVER['PHP_SELF']}?f=$f&page=$total_pages'>Last</a>"; } ?> // After this point nothing on the page shows and no errors come up ??? <center><form action=addthread.php?f=$f method=post><table border=0><tr> <td>Title <input type=text name=title></td></tr> <tr><td>Message <br><textarea rows=10 cols=50></textarea></td></tr><tr><td><imput type=submit value=Post!></td></tr></table> </td></table> <center> <? include 'links.php'; ?> </center> Quote Link to comment Share on other sites More sharing options...
joquius Posted April 3, 2007 Share Posted April 3, 2007 Where is $page defined? Quote Link to comment Share on other sites More sharing options...
almightyegg Posted April 3, 2007 Author Share Posted April 3, 2007 $page = (is_numeric($_GET['page']) && $_GET['page'] > 0) ? $_GET['page'] : 1; that wasn't the whole page, that's a snippet of the bit that isn't showing and the bit above it Quote Link to comment Share on other sites More sharing options...
holiks Posted April 3, 2007 Share Posted April 3, 2007 Is it the form that's not showing up or the generated_links before it? Quote Link to comment Share on other sites More sharing options...
almightyegg Posted April 4, 2007 Author Share Posted April 4, 2007 Everything below is in the page code, but isn't showing: <center><form action=addthread.php?f=$f method=post><table border=0><tr> <td>Title <input type=text name=title></td></tr> <tr><td>Message <br><textarea rows=10 cols=50></textarea></td></tr><tr><td><imput type=submit value=Post!></td></tr></table> </td></table> <center> <? include 'links.php'; ?> </center> Quote Link to comment Share on other sites More sharing options...
almightyegg Posted April 4, 2007 Author Share Posted April 4, 2007 Do you need to see more of the code to help me? Quote Link to comment Share on other sites More sharing options...
almightyegg Posted April 4, 2007 Author Share Posted April 4, 2007 ^bump^ Sorry if you think I'm impatient but it's a crucial problem and I have limited time to fix it Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted April 4, 2007 Share Posted April 4, 2007 You have incorrect HTML coding all over. Always put attribute values in quotes. Also you reference a PHP variable outside of PHP. If you do a "Show source" in your browser, does an of your generated code show? Change the form code to: <center><form action="addthread.php?f=<?php echo $f ?>" method="post"><table border="0"><tr> <td>Title <input type="text" name="title"></td></tr> <tr><td>Message <br><textarea rows="10" cols="50"></textarea></td></tr><tr><td><input type="submit" value="Post!"></td></tr></table> </td></table> <center> <?php include 'links.php'; ?> </center> Ken Quote Link to comment Share on other sites More sharing options...
almightyegg Posted April 4, 2007 Author Share Posted April 4, 2007 Yea, I'm a very rushy person, I try and get things done short hand. I changed it and it is easier to read... When I view page source it doesn't have any of that code in it... Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted April 4, 2007 Share Posted April 4, 2007 I think we need to see more of your code. Are you using a database? If you remove the form code, does anything show on the page? Ken Quote Link to comment Share on other sites More sharing options...
almightyegg Posted April 4, 2007 Author Share Posted April 4, 2007 I've found a way that it will show it, in the while nothing was brought out because it had no messaged in that forum, so I added a few through PhpMyAdmin and it shows, but there won't always be messages in all of them...so I would like to know why it didn't show... Quote Link to comment Share on other sites More sharing options...
holiks Posted April 5, 2007 Share Posted April 5, 2007 Sounds like it may be related to your configuration.....have you tried testing your script on another server setup? Quote Link to comment 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.