beebosoft Posted May 30, 2009 Share Posted May 30, 2009 I am working on a dynamic menu to fit into an already heaviliy populated website which can't be converted to php at present. I am using an iframe to bring in the menus which is working well and am able to remember the current users choice of category if they click on any of the menu items shown. what I now want to do is not show all the results at once and limit returned results to around 15 with previous and next buttons. I have done this before on purely php pages using the ?id=$limit info on the text link but because it is in the iframe and not the html page this is not working. I would appreciate any suggestions as to how I can use the limit thing for next and previous within the iframe so that this works properly. I have tried to use session variables but think i may be putting in the wrong places. Each time a new category is chosen the session variables need to be reset for the results of the new choice I have tried doing this in the form but am not sure if in the correct paces. print '<form action="showmenu.php" method="post" >'; print "<select name='page' size='1' onChange='this.form.submit()' >"; print "<option value='venuename' selected>Choose Category</option>"; while ($row1 = mysql_fetch_assoc($resultID)) { $name = $row1['CategoryName']; $value = $row1['value']; print "<option value='$value'>$name</option>"; } $_SESSION['limit'] = 10; $_SESSION['nextlimit'] = 0; $_SESSION['total'] = 0; $_SESSION['previouslimit'] = -10; print" </select>"; print "</form>"; Thanks in anticipation Angie Link to comment https://forums.phpfreaks.com/topic/160267-iframes-and-using-limits/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.