You are viewing our Forum Archives. To view or take place in current topics click here.
Hello - i need help with this dropdown menu thing[php][html]
Posted:
Hello - i need help with this dropdown menu thing[php][html]Posted:
Status: Offline
Joined: Mar 13, 201311Year Member
Posts: 41
Reputation Power: 1
Status: Offline
Joined: Mar 13, 201311Year Member
Posts: 41
Reputation Power: 1
Im trying to make this dropdown enter a value into a url then get that value from the url and if it = something then do the relevant thing but i cant seem to get it to work
that is what i have got so far
<html>
<head>
<title>
Home-page
</title>
</head>
<body>
<select onchange=')'>
<option value="North" href="?dir=Noth"> <a href="?dir=North">North</a></option>
<option value="Central">Central</option>
<option value="East" href="?dir=East"><a href="?dir=East">East</option>
</select>
<?php
if(isset($_GET['East'])){
echo "hello";
}
?>
</body>
</html>
#2. Posted:
Status: Offline
Joined: Jun 25, 201113Year Member
Posts: 163
Reputation Power: 6
Status: Offline
Joined: Jun 25, 201113Year Member
Posts: 163
Reputation Power: 6
Change your php to this:
You need to check the variable name, not the value.
if(isset($_GET['dir'])){
echo "hello";
}
You need to check the variable name, not the value.
- 0useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Mar 13, 201311Year Member
Posts: 41
Reputation Power: 1
Status: Offline
Joined: Mar 13, 201311Year Member
Posts: 41
Reputation Power: 1
LAXDUDE182 wrote Change your php to this:
if(isset($_GET['dir'])){
echo "hello";
}
You need to check the variable name, not the value.
Okay so how would i check if it is = to a name
- 0useful
- 0not useful
#4. Posted:
Status: Offline
Joined: Mar 13, 201311Year Member
Posts: 41
Reputation Power: 1
Status: Offline
Joined: Mar 13, 201311Year Member
Posts: 41
Reputation Power: 1
AndrewHuby wroteand that code till deosn't workLAXDUDE182 wrote Change your php to this:
if(isset($_GET['dir'])){
echo "hello";
}
You need to check the variable name, not the value.
Okay so how would i check if it is = to a name
- 0useful
- 0not useful
#5. Posted:
Status: Offline
Joined: Jun 25, 201113Year Member
Posts: 163
Reputation Power: 6
Status: Offline
Joined: Jun 25, 201113Year Member
Posts: 163
Reputation Power: 6
You are viewing our Forum Archives. To view or take place in current topics click here.