Hi,
I am trying to build a page that will span 2 question with drop down menu (yes or no), the condition is if 1 of those question is yes per say then, a third question should appear right below on the same page without losing the previous questions/info. What would be the best to do that while using HTML and PHP? Thanks.
Post without losing data using PHP (Easy question)
Moderator: General Moderators
-
bibumathew
- Forum Newbie
- Posts: 8
- Joined: Tue Aug 03, 2010 5:36 pm
Re: Post without losing data using PHP (Easy question)
The best way should be using an ajax
-
internet-solution
- Forum Contributor
- Posts: 220
- Joined: Thu May 27, 2010 6:27 am
- Location: UK
Re: Post without losing data using PHP (Easy question)
Agree.bibumathew wrote:The best way should be using an ajax
This can also be achieved the same with only PHP. It will not be as elegant as Ajax solution, but will do the trick.
Put the first two questions on page1.php in a form. Then post form values to page2.php where the first two questions will be shown along with answers populated from $_POST variables and third question will be shown or not depending on answers to first two questions.