AlfieWebDevTips Homefor new and experienced developers
[Home Home] [Web Development Web Development ] [Code Generators Code Generators ] [Resources Resources ] [Forums Forum ] [Contact Us Contact ] |WebDevTips Privacy Privacy |

WebDevTips Pick Of The Day : ".$todaytip[$today]." |

"; ?>
Print This Page



 


You are here : Home - Web Development - PHP - Jump Menu

PHP Jump Menu



Most people are familiar with the javascript menu where you select a link from a form menu. The problem is, what if javascript is disabled or a visitor does not use a javascript capable browser? Basically your menu won't work.

This php version is so simple but adds so much more value and overall use than the javascript equivalent.

You need to create a page called jump.php - all this contains is the following.

<? 
header("Location: $url"); 
?>

Save the above as jump.php

Next create your menu.

<form action="FULL/PATH/TO/jump.php"> 
    <select name="url" size="1"> 
    <option value="put url here" selected>link 1</option> 
    <option value="put url here">link 2</option> 
    <option value="put url here">link 3</option> 
    </select> 
    <input type="submit" value="quick jump"> 
</form>

That's about all there is to it, easy, and to be honest a lot easier than the javascript version:)

Make life easier by using our click and go to combine the power of javascript and php.


Why not discuss this article in our forum?
Updated 30-Dec-2003




Google
 

[back to top of page]   

[labelled with icra -  - this link will open in a new window] [RSS Content]

[Copyright © WebDevTips]