Zoofu Posted August 19, 2009 Share Posted August 19, 2009 $amount_check = "SELECT * FROM `forum_replies` WHERE `tid`='".$id."'"; $amount_check_res = mysql_query($amount_check) or die(mysql_error()); $amount_count = mysql_num_rows($amount_check_res); $pages = ceil($amount_count/$limit); $previous = ($page-1 <= 0) ? "« Prev" : "<a href=\"./index.php?act=topic&id=".$id."&page=".($page-1)."\">« Prev</a>"; $nextpage = ($page+1 > $pages) ? "Next »" : "<a href=\"./index.php?act=topic&id=".$id."&page=".($page+1)."\">Next »</a>"; echo "<tr><td align=\"right\" colspan=\"2\">\n"; echo "Pages: "; echo $previous; for($i=1;$i<=$pages;$i++){ $href = ($page == $i) ? " ".$i." " : " <a href=\"./index.php?act=topic&id=".$id."&page=".$i."\">".$i."</a> "; echo $href; } echo $nextpage; echo "</td></tr>\n"; $select_sql = "SELECT * FROM `forum_replies` WHERE `tid`='".$id."' ORDER BY id ASC LIMIT ".$end.",".$start.""; $select_res = mysql_query($select_sql) or die(mysql_error()); while($rowr = mysql_fetch_assoc($select_res)){ echo "<tr><td colspan=\"2\" align=\"left\" class=\"forum_header\">Posted On: <em>".$rowr['date']."</em></td></tr>\n"; echo "<tr><td align=\"left\" width=\"15%\" valign=\"top\" class=\"forum_header\">".uid($rowr['uid'], true)."<br>Total Posts: ".post($rowr['uid'])."<br>".$a."</td>\n"; echo "<td align=\"left\" valign=\"top\" class=\"forum_header\">\n"; echo topic($rowr['message']); echo "</td>\n"; echo "</tr>\n"; } echo "<form method=\"post\" action=\"./index.php?act=reply&id=".$row['id']."\">\n"; echo "<tr><td colspan=\"2\" align=\"center\"><textarea style=\"width:90%\" name=\"reply\"></textarea><br><input type=\"submit\" name=\"submit\" value=\"Add Reply\" style=\"width:90%\"></td></tr>\n"; echo "</table>\n"; in my next script I use: if(!$_POST['submit']){ but it doesn't run the rest of the script because apparently $_POST['submit'] doesn't actually exist. [Above is only part of my script] Link to comment https://forums.phpfreaks.com/topic/171031-spot-the-problem/ Share on other sites More sharing options...
jonsjava Posted August 19, 2009 Share Posted August 19, 2009 you are saying: if $_POST['submit'] isn't set, then do all that comes next try this: if (isset($_POST['submit])){ //..... } Link to comment https://forums.phpfreaks.com/topic/171031-spot-the-problem/#findComment-902034 Share on other sites More sharing options...
roopurt18 Posted August 19, 2009 Share Posted August 19, 2009 Make sure this isn't your problem: http://www.phpfreaks.com/forums/index.php/topic,167898.0.html Link to comment https://forums.phpfreaks.com/topic/171031-spot-the-problem/#findComment-902036 Share on other sites More sharing options...
Zoofu Posted August 19, 2009 Author Share Posted August 19, 2009 No, I need to do it so that all that comes next if it isn't, because then it echo's "Invalid Path!"; because I also have quite a number of else statements. Link to comment https://forums.phpfreaks.com/topic/171031-spot-the-problem/#findComment-902040 Share on other sites More sharing options...
Zoofu Posted August 19, 2009 Author Share Posted August 19, 2009 Nevermind, i've managed to fix it. Link to comment https://forums.phpfreaks.com/topic/171031-spot-the-problem/#findComment-902043 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.