biltong Posted November 10, 2006 Share Posted November 10, 2006 I am building a web site for my degree and i have to do a form to php to web site link. the form has 22 names in it and each name has to be linked to a different web page.Here is the code i am using.FORM<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Drop Down Menu</title><style type="text/css"><!--body,td,th { color: #FFFFFF;}body { background-color: #0099FF;}.style1 { font-family: "Imprint MT Shadow"; font-size: 24px;}.style3 {font-family: "Imprint MT Shadow"; font-size: 36px; }.style4 {font-size: 36px}.style9 { font-family: "Imprint MT Shadow"; color: #FFFFFF; font-size: 42px;}--></style></head><p align="center" class="style9">Manchester City Player Stats </p><p align="center"> </p><p align="center"> </p><body><form name="form1" method="get" action="target.php"> <select name="players"> <option>Joe Hart</option> <option>Isaksson</option> <option>Kasper Schmeichel</option> <option>Nickey Weaver</option> <option>Sylvain Distin</option> <option>Richard Dunne</option> <option>Stephen Jordan</option> <option>Danny Mills</option> <option>Matthew Mills</option> <option>Nedum Onuoha</option> <option>Micah Richards</option> <option>Jihai Sun</option> <option>Ben Thatcher</option> <option>Hatem Trabelsi</option> <option>Joey Barton</option> <option>Ousmane Dabo</option> <option>Dietmar Hamann</option> <option>Michael Johnson</option> <option>Claudio Reyna</option> <option>DaMarcus beasley</option> <option>Ishmael Miller</option> <option>Trevor Sinclair</option> <option>Bernardo Corradi</option> <option>Paul Dickov</option> <option>Georgious Samaras</option> <option>Darius Vassell</option> </select> </label> <label> <input name="players" type="submit" value="submit" /> </label></form></body></html>Php<?php$players = $_get[players];if($players == "Isaksson"){$url= 'http://www.bbc.co.uk'; }header('Location:$url');exit;?> the php only refers to 1 name at the moment.The problem is it does not workThanks Link to comment https://forums.phpfreaks.com/topic/26854-help-help-please-newiesolved-thanks/ Share on other sites More sharing options...
Barand Posted November 10, 2006 Share Posted November 10, 2006 <option value='http://www.bbc.co.uk'>Isaksson</option>etcThen[code]<?php$url = $_get[players];header("Location:$url"); // NB double quotesexit;?>[/code] Link to comment https://forums.phpfreaks.com/topic/26854-help-help-please-newiesolved-thanks/#findComment-122795 Share on other sites More sharing options...
biltong Posted November 10, 2006 Author Share Posted November 10, 2006 Thanks Link to comment https://forums.phpfreaks.com/topic/26854-help-help-please-newiesolved-thanks/#findComment-122798 Share on other sites More sharing options...
biltong Posted November 10, 2006 Author Share Posted November 10, 2006 does not work :( Link to comment https://forums.phpfreaks.com/topic/26854-help-help-please-newiesolved-thanks/#findComment-122802 Share on other sites More sharing options...
Barand Posted November 10, 2006 Share Posted November 10, 2006 Sorry, $_GET. Case sensitive Link to comment https://forums.phpfreaks.com/topic/26854-help-help-please-newiesolved-thanks/#findComment-122816 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.