last day (16 days later) » 

2:07 PM
-2
Q: multiple submit button using $_SERVER['PHP_SELF'] form tag is not working

user3379528I am using PHP Form Validation ($_SERVER['PHP_SELF']) with 2 submit button and a hidden tag, one is to do filter submit (submitbtn) and the other is to do sorting submit (lowest) but only my filter button is working, how do i make my sorting button and my hidden tag to work on php. thank you guys...

 
So where is the code that calls this function? That is where you should be checking which button is pressed
 
hi RiggsFolly, thanks for your reply but what i know is the code this resource/find.php. All my isset post is working except if(isset($_POST['lowest'])) is not working.
the last input name is lowest , type is submit, is to click and send hidden name lprice to resource/find.php
 
Oh so it is, silly me :)
 
NVM, is ok u only one that reply me. i really appericate
pls help me i very stress, i cant solved for a month. thanks alot
 
This code will only run ONE query... If the IF is supposed to decide which query to run, then I think you need and ELSE on it and a different query inside it
Every time you use the mysql_ database extension in new code this happens it is deprecated and has been for years and is gone for ever in PHP7.0+. If you are just learning PHP, spend your energies learning the PDO or mysqli database extensions and prepared statements. Start here
 
2:07 PM
yap i know, i want it to run one query, but i just dont understand why if(isset($_POST['lowest'])) is not working. even i name my input field in different name
i mean my 2 input submit in different name. sorry riggsfolly, im a inexperience coder. thanks for looking into my code
 
What is it that makes you think that if(isset($_POST['lowest'])) is not working.
 
thanks , im 3375928
 
Yea I know. See above message :)
 
how to make it work, i really desperate
 
What is it that makes you think that if(isset($_POST['lowest'])) is not working.
 
2:14 PM
cause my lprice the varibale is not working under if(isset($_POST['lowest']))
but if i bring out this $lprice = $_POST['lprice']; it will work
0
Q: Unable to show map sort result list upon clicking on dropdown sort function(onchange="this.form.submit())

user3379528Would appreciate some kind help here as I'm experiencing some issue with regards to sorting of result from my map database. I trying to use onchange="this.form.submit() to activate my dropdown sort function, but somehow I kept getting plain text display of the sorted result. However, it would wor...

i have post this question before, is related to my map, there is something to do with $_SERVER['PHP_SELF'] on the action form tag which only accept one submit button which is <input class="submitbtn" type="submit" value="Search" name="submitbtn">, how to make 2 diff submit work in the same form tag
hi riggs are you receiving
 

last day (16 days later) »