PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
xNuManx
Forum Newbie
Posts: 13 Joined: Wed Aug 27, 2008 9:17 am
Post
by xNuManx » Sun Mar 29, 2009 4:37 pm
Hello, I am trying to get this code to work, but its not. here's what i have:
Code: Select all
<input type="radio" name="genre" value="Reggaeton">Reggaeton<br>
<input type="radio" name="genre" value="Merengue">Merengue<br>
<input type="radio" name="genre" value="DominicanHipHop">Dominican Hip-Hop<br>
<input type="radio" name="genre" value="Rap">Rap<br>
<input type="radio" name="genre" value="Rock">Rock<br>
And my $_POST:
Code: Select all
if($_POST['genre'] == "Reggaeton") {
$chlist = 1;
} elseif($_POST['genre'] == "Merengue") {
$chlist = 2;
} elseif($_POST['genre'] == "DominicanHipHop") {
$chlist = 3;
} elseif($_POST['genre'] == "Rap") {
$chlist = 4;
} elseif($_POST['genre'] == "Rock") {
$chlist = 5;
}
But my $_POST is not working, Any help please!
requinix
Spammer :|
Posts: 6617 Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA
Post
by requinix » Sun Mar 29, 2009 5:12 pm
Make sure the genre shows up in there. Sure you're using POST and not GET?
xNuManx
Forum Newbie
Posts: 13 Joined: Wed Aug 27, 2008 9:17 am
Post
by xNuManx » Sun Mar 29, 2009 5:45 pm
tasairis wrote:
Make sure the genre shows up in there. Sure you're using POST and not GET?
Yeah i am using post, and genre does comes out there:
[genre] => Reggaeton
requinix
Spammer :|
Posts: 6617 Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA
Post
by requinix » Sun Mar 29, 2009 7:04 pm
So how do you know it's not working? Have you checked $chlist to see if that's right?