Dropdown Menu in PHP

Browsing around the web you'll notice tons of drop-down menus that let you navigate to different areas of that web site.   Drop down menu navigation is great because it lets you add a lot of navigation options, without taking up much space.  I know, for the web dev buffs out there you would probably never want to do this in PHP alone, but I found a cool tidbit of info on this and wanted to share.  So if you're looking for how to do this on a large-scale you probably want to turn to JavaScript.

With that said, one way to replicate a drop down menu with PHP is to setup an HTML form somewhere on your page and have it pass the site's URL to a PHP page when you submit it.  For example:

<form action="jump.php" method="post"> <select name=url> <option value="http://php.about.com">About PHP</option> <option value="http://www.identity.st">Identity</option> </select> <input type="submit" value="Go"> </form>

Then have the PHP file jump.php use basic redirection to send them to the right page.  For example:

<?php $url = $_POST["url"]; header("Location: $url"); ?>

Give it a shot!

How to Install WAMP for Wordpress

I'm a web and mobile app developer and recently had a friend tell me all about MAMP. I've always used a PC and when I heard about WAMP (Windows Apache MySQL PHP) I wanted to give it a shot. I was working on setup and found out how to get WAMP running, and get a virtual environment of Wordpress going using WAMP. I'm going to show you how in a couple easy steps. I'm running Windows 7 on a 32-bit machine. 1) Start by downloading the WAMP server software on your Windows machine. 2) After downloading, install it to the preferred directory, C:/wamp. 3) Download the latest Wordpress package. The file downloaded will be a .zip file. Extract this to the folder C:/wamp/www. All of the files will come in a folder called WordPress.  You can either leave the folder as is, or you can cut them from the wordpress folder and paste them directly into the www folder.  I left tham in the wordpress folder (helpful if you want to add more sites to the www directory later). 4) Open up the WAMP server by left-clicking the WAMP icon in your Windows icon tray and clicking Start All Services.  The icon should go green.  Now, click the icon again and select phpMyAdmin. Note: If you see an error page here, you'll need to turn off IIS (Control Panel -> Programs and Features -> Turn Features on or off), since both IIS and apache use port 80 (you can also change WAMP config not to use port 80 but it can get messy). Selecting phpMyAdmin will open an new tab in your browser and there will be a field for creating a database. Put in any name you want name and hit create. 5) Now all you have to do is open a new tab in your browser and localhost/wordpress (if you didn't unzip it to the wordpress folder it will just be localhost/whatever folder you put it in). This will bring up a window that asks you for all of your information. Provide the database name you chose, your database username, which is root, and password, which you can leave blank (you can change these if you want). Now, connect, install, and you are up and running!

Let me know if you have any questions. If you haven't used WordPress before you're bound to run into a few problems.