web 2.0

How to use PHP & Jump Menu

How to use PHP & Jump Menu This tutorial how to using PHP read a variable from Jump Menu

ShotDev Focus:
- Using PHP & Jump Menu

Example

php_jumpmenu1.php


<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<body>
<form action="php_jumpmenu2.php" method="post" name="form1">
Jump Menu <br>
<select name="jmpMenu1" onChange="MM_jumpMenu('parent',this,0)">
<option value="">-------</option>
<option value="php_jumpmenu2.php?Vol=Value1">Option1</option>
<option value="php_jumpmenu2.php?Vol=Value2">Option2</option>
</select>
<input name="btnSubmit" type="submit" value="Submit">
</form>
</body>
</html>

php_jumpmenu2.php


<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<?
echo $_GET["Vol"];
?>
</body>
</html>

Create a php file and save to path root-path/myphp/

Run
http://localhost/myphp/php_jumpmenu1.php

Screenshot

PHP Jump Menu

PHP Jump Menu
.
.
.

Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (1 votes, average: 1.00 out of 10)
Loading ... Loading ...

One Response to “How to use PHP & Jump Menu”

  1. 2hallucination…

Leave a Reply

You must be logged in to post a comment.