Jump to content

Recommended Posts

OK, The data will come from a list menu. this is the code - you can view how it functions now by going to
[a href=\"http://www.countrysavingsmagazine.com/master_coupon.php\" target=\"_blank\"]http://www.countrysavingsmagazine.com/master_coupon.php[/a]
I'm not sure if there has to be something added to the <head> of the page??

<?php include ('connections/mysql_connect.php');
$row_query = mysql_query("SELECT * FROM categories;");
$row_number = mysql_num_rows($row_query); ?>
<?php
echo "<form name='form1' method='post' action='master_coupon.php'>
<select name='cat_id' size='".$row_number."' onChange='MM_jumpMenu('parent',this,0)'>";
$qry = mysql_query("SELECT * FROM categories;");
while($rows = mysql_fetch_assoc($qry)) {
echo "<option value='".$rows['cat_id']."'>".$rows['cat_name']."</option>\n";
}
?>
</select><br>
<br>
<input name='submit' type='submit' value='Select Category'>
</form>

this is from one of my pages

The Drop Down Box

<td align="right" valign="bottom" class="jumpto">
<select style="font-size:9;" name="choice" onChange="jump(this.form)">

<option>Go to...</option>
<option value="private.php">Private Messages</option>
<option value="private.php?do=send">Send PM</option>
</select>
</td>

Header javascript

<script LANGUAGE="JavaScript" type="text/javascript">
<!--
function jump(menu)
{
ref=menu.choice.options[menu.choice.selectedIndex].value;
splitc=ref.lastIndexOf("*");
target="";
if (splitc!=-1)
{loc=ref.substring(0,splitc);
target=ref.substring(splitc+1,1000);}
else {loc=ref; target="_self";};
if (ref != "") {land(loc,target);}
}
//-->
</SCRIPT>

Now, this will allow you to enable a navigation based on it, and if you use $_GET in urls as the variables then you can just have things print to the URL, like I have in the above example "private.php?do=send"

That maybe what you were going for? If you had subcategories you could chain this system together to lower sub levels.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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