Jump to content

Help Help please newie(SOLVED thanks)


biltong

Recommended Posts

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">&nbsp;</p>
<p align="center">&nbsp;</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 work


Thanks

Link to comment
https://forums.phpfreaks.com/topic/26854-help-help-please-newiesolved-thanks/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.