Gayner Posted September 1, 2009 Share Posted September 1, 2009 <select> <option name="amountonly">Amount ?</option> <option>Coffee</option> <option>Tea</option> </select> PHP:: if ($ibforums->input['amountonly']) $l = "or LOWER(amount) LIKE '%$search_string%'"; else $l = "5"; Am I missing something? the 5 is to try to see if my input catches it.. it catches if it's like in a submit input type but how do i do it for Value [select] ? Thank! Quote Link to comment https://forums.phpfreaks.com/topic/172695-this-stupid-form-lol-easy-tho/ Share on other sites More sharing options...
JonnoTheDev Posted September 1, 2009 Share Posted September 1, 2009 <select> <option name="amountonly">Amount ?</option> <option>Coffee</option> <option>Tea</option> </select> You are missing valid HTML! Quote Link to comment https://forums.phpfreaks.com/topic/172695-this-stupid-form-lol-easy-tho/#findComment-910278 Share on other sites More sharing options...
Gayner Posted September 1, 2009 Author Share Posted September 1, 2009 <select> <option name="amountonly">Amount ?</option> <option>Coffee</option> <option>Tea</option> </select> You are missing valid HTML! That's exact same ? Quote Link to comment https://forums.phpfreaks.com/topic/172695-this-stupid-form-lol-easy-tho/#findComment-910280 Share on other sites More sharing options...
JonnoTheDev Posted September 1, 2009 Share Posted September 1, 2009 That is a quote from your post, not a rewrite! Learn HTML http://www.w3schools.com/TAGS/tag_Select.asp Quote Link to comment https://forums.phpfreaks.com/topic/172695-this-stupid-form-lol-easy-tho/#findComment-910281 Share on other sites More sharing options...
Gayner Posted September 1, 2009 Author Share Posted September 1, 2009 That is a quote from your post, not a rewrite! Learn HTML http://www.w3schools.com/TAGS/tag_Select.asp <select> <option value="amountonly">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option> </select> This good ? Quote Link to comment https://forums.phpfreaks.com/topic/172695-this-stupid-form-lol-easy-tho/#findComment-910282 Share on other sites More sharing options...
KevinM1 Posted September 1, 2009 Share Posted September 1, 2009 <select> <option name="amountonly">Amount ?</option> <option>Coffee</option> <option>Tea</option> </select> PHP:: if ($ibforums->input['amountonly']) $l = "or LOWER(amount) LIKE '%$search_string%'"; else $l = "5"; Am I missing something? the 5 is to try to see if my input catches it.. it catches if it's like in a submit input type but how do i do it for Value [select] ? Thank! First, your select element should have the name, rather than one of its options. Second, your options need values. Third, what is it you're trying to do exactly? Putting up random code, malformed HTML, and saying it doesn't work isn't much for the rest of us to go on. Quote Link to comment https://forums.phpfreaks.com/topic/172695-this-stupid-form-lol-easy-tho/#findComment-910285 Share on other sites More sharing options...
Gayner Posted September 1, 2009 Author Share Posted September 1, 2009 <select> <option name="amountonly">Amount ?</option> <option>Coffee</option> <option>Tea</option> </select> PHP:: if ($ibforums->input['amountonly']) $l = "or LOWER(amount) LIKE '%$search_string%'"; else $l = "5"; Am I missing something? the 5 is to try to see if my input catches it.. it catches if it's like in a submit input type but how do i do it for Value [select] ? Thank! First, your select element should have the name, rather than one of its options. Second, your options need values. Third, what is it you're trying to do exactly? Putting up random code, malformed HTML, and saying it doesn't work isn't much for the rest of us to go on. Well my code is: if ($ibforums->input['searchQQ'] == 'amount') $l = "or LOWER(amount) LIKE '%$search_string%'"; else $l = "5"; <select name='searchQQ'> <option value="amount">Volvo</option> <option value="amount5">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option> </select><input type="submit" value="Search" /> </form> it's working now and im gonna finish rest of values, this is for when people search they can choose which table they want to search in i am pretty good not gonna lie i jsut need php freaks help Quote Link to comment https://forums.phpfreaks.com/topic/172695-this-stupid-form-lol-easy-tho/#findComment-910301 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.