I am trying to make a page where someone selects an option on one form, a code is executed depending on the selection, and then a new form appears for another option.
Could it be that my forms are clashing into each other because when I have them both on one page AND them action="" set to the same page, they don't work. If I have them on the same page but they have different actions, it works.
I do not want to redirect my users to another page and then back (because the one with the different action redirects them to its action). Also, when it redirects them I cannot execute code based on whether or not the second form was completed AFTER they were sent away and back.
here:
FORM 1
<form action='fcenter.php?page=planet1' method='post'>
<select size='4' name='fight'>
<option value='Aliens'>Aliens</option>
<option value='Marines'>Marines</option>
<option value='Native Animals'>Native Species</option>
<option value='Totally Random'>Randomize</option>
</select>
<input type='submit' name='choose' value='Search'/>
</form>
FORM 2
<form action='fcenter.php?page=planet1' method='post'>
<input type='radio' name='attack' value='Attack'/>Attack<br/>
<input type='radio' name='attack' value='Flee'/> Flee <br/>
<input type='submit' name='confirm' id='confirm' value='Choose'/>
</form>
Ideal situation:
Member answers form 1 --> Form 2 comes up (answers form 2) --> Code is executed based on what they chose on form 2 (this code involves $_SESSIONs)
What it is doing is this:
Member answers form 1 --> Form 2 comes up (with different action) --> Send to enemy.php --> Redirect back to original page --> Now the original page is reloaded so I cannot execute the code based on form 2!!!!
What if form 1 was a $_GET form? >.> <.< then I could redirect them to...the page they chose?