This topic is locked

About Selection of Drop Down on Maim Menu

11/22/2007 10:23:08 PM
PHPRunner General questions
S
sunrise999 author

Dears,

I want to know how to achive this function:
From main menu I hope I can select the content of this column.
Please kindly see the following img.


After I hit one Main Colunm:

J
Jane 11/23/2007

Hi,
you can do it using custom event (Insert PHP code snippet option on the Visual Editor tab).

Here is a sample code:

global $conn;

$links = "<select onchange=\"window.location.href=this.options[this.selectedIndex].value;\">";

$str = "select Type from TableName";

$rs = db_query($str,$conn);

while ($data = db_fetch_array($rs))

$links.="<option value=\"TableName_list.php?a=search&value=1&SearchFor=".$data["Type"]."&SearchOption=Contains&SearchField=Type\">".$data["Type"]."</option>";

$links.="<select>";

echo $links;



where TableName id your actual table name.

S
sunrise999 author 11/26/2007

Thank you very much!

I will check.
Best Regards,

Sunrise