![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jul 2003
Location: Mobtown
Posts: 2,613
|
Story of my life! Little PHP help. WTF is wrong here?
Simple simple little script here has been giving me fits for 2 days. Any help is GREATLY appreciated.
I have a simple form like this: Code:
<form action ="div2.php" method = "POST" /> Div: <select name = "div"> <option value = "" selected>Choose Division</option> <option value = "div1">1 - 9</option> <option value = "div2">10 - 14</option> <option value = "div3">15 - 19</option> <option value = "div4">20 - 24</option> <option value = "div5">25 - 29</option> <option value = "div6">30 - 34</option> <option value = "div7">35 - 39</option> <option value = "div8">40 - 44</option> <option value = "div9">45 - 49</option> <option value = "div10">50 - 54</option> <option value = "div11">55 - 59</option> <option value = "div12">60 - 64</option> <option value = "div13">65 - 69</option> <option value = "div14">70 - 74</option> <option value = "div15">75 - 99</option> </select> PHP Code:
Array ( [div] => div2 [race] => thin2009 [search] => Go! ) div2BETWEEN '1' AND '9'div2 Why the fuck is the if elseif not working? notice it's returning the same result no matter what division they choose, ie: choose div2 and it SHOULD switch $q = BETWEEN 10 AND 14. WTF? There's no whitespaces around the POST values. Already checked. Thanks in advance gurus! ![]()
__________________
no sig |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Porn Meister
Industry Role:
Join Date: Feb 2005
Posts: 16,443
|
Should it be "==" to determine the "if"?
__________________
43-922-863 Shut up and play your guitar. ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
So Fucking Banned
Industry Role:
Join Date: Mar 2009
Location: Europe
Posts: 1,595
|
you fail at php
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jul 2003
Location: Mobtown
Posts: 2,613
|
HOLY SHIT man. What a stupid ass mistake! That did it. Damn man can't thank you enough. Love this place sometimes!
![]()
__________________
no sig |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Jul 2003
Location: Mobtown
Posts: 2,613
|
And?
![]() Wish I was a smart as you but oh well! The world needs stupid people like me too right? ![]()
__________________
no sig |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Porn Meister
Industry Role:
Join Date: Feb 2005
Posts: 16,443
|
Cool
![]() http://www.php.net/manual/en/control-structures.if.php Scroll down to the example by person called grawity.
__________________
43-922-863 Shut up and play your guitar. ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Confirmed User
Join Date: Jul 2003
Location: Mobtown
Posts: 2,613
|
Quote:
__________________
no sig |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
H.B.I.C.
Industry Role:
Join Date: Jun 2003
Location: NC
Posts: 30,122
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Guest
Posts: n/a
|
Honest mistake, happens to me a lot.
|
![]() ![]() ![]() ![]() ![]() |