Jump to content


Photo

drop down box not oging to specified links?


  • Please log in to reply
2 replies to this topic

#1 localhost

localhost
  • Members
  • PipPipPip
  • Advanced Member
  • 152 posts

Posted 30 July 2006 - 07:12 AM

Help out with this script?

Code:
<?php
/*---------------------------------------------------+
| [dotOmega 0.1.0 Beta] Community System
+----------------------------------------------------+
| Copyright © 2006 Robert Playford
| http://dotomega.com
+----------------------------------------------------+
| Filename: forumjump.php - 07-30-2006 - 02:55AM
| File written by: Dan La Manna (Copernicus)
+----------------------------------------------------*/

/* 
FORUMS TYPES

1 = Category
2 = Forum
*/

// Require necessary file(s)
require_once "inc/global.php";
require_once "inc/config.php";

echo "
<select name=\"forum_jump\">
";

// Select all categories...
$sel_cats_for = query("SELECT * FROM `" . $config['table_prefix'] . "forums` WHERE `type` = '1'");
	while ($rowcats = fetch_array($sel_cats_for)) {
		$cat_id = $rowcats['id'];
		$cat_title = $rowcats['title'];
echo "
<option><A href=\"showcat.php?cid=$cat_id\">-- $cat_title</a></option>
";

$sel_fors = query("SELECT * FROM `" . $config['table_prefix'] . "forums` WHERE `type` = '2'");
		while ($rowfors = fetch_array($sel_fors)) {
			$for_id = $rowfors['id'];
			$for_title = $rowfors['title'];

echo "
<option><A href=\"forumdisplay.php?fid=$for_id\">Forum</a></option>
";
}
}
?>
</select>
<input type="submit" name="go" value="Go">


#2 localhost

localhost
  • Members
  • PipPipPip
  • Advanced Member
  • 152 posts

Posted 30 July 2006 - 10:21 AM

anyone?

#3 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 30 July 2006 - 10:25 AM

do you get any errors

maybe you should through in a
or die(mysql_error());


Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users