I got an issue right now, and I really don't understand why, lol. Let me explain it!
What I want to do : If form has been submitted and return false, take "correct" values within the form and place it into his right input value so that the customer won't fill it again. (In this situation, it's about a select tag with many options)
What it's doing : Well, when I click on submit, my option selected it's ALWAYS the value 3 (5 ans et plus) but when I try to echo out $_POST['depuis'], it is the right value that echos out.
Here's my partial script :
Answer
Replace
if(isset($_POST['depuis']) == '0')
with
if(isset($_POST['depuis']) && $_POST['depuis'] == '0')
and so on...
No comments:
Post a Comment