Jump to content

[SOLVED] text disappearing


almightyegg

Recommended Posts

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>

Link to comment
https://forums.phpfreaks.com/topic/45455-solved-text-disappearing/
Share on other sites

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>

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

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...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.