php form tag question?

Mit Chauhan

New member
JAI MATADI all . .

m working on a project in which m getting problem in search users .. here is what i want to say ..

i have FORMSEARCH.PHP and FORMSEARCHRESULT.PHP ..
what m doing here is on FORMSEARCH.PHP the user will search the other users according to their GENDER .. and assume in the second search the user can also search the user by the name ..

but when my page go to FORMSEARCHRESULT.PHP m getting the GENDER or NAME selected or written by the user .. but when i refresh this page .. it obviously my page getting blank .. coz i set "ISSET" in that .. i dont want that .. i want to show the same result coz anybody can refresh the page .. here is my code ..

------------------------------------------------------------------------------------
FORMSEARCH.PHP
----------------------------
<form name="f1" method="post" action="formsearchresult.php">
Select Gender :
<input type="radio" name="gender1" value="Male" />Male
<input type="radio" name="gender1" value="Female" />Female
<br />
<input type="submit" name="submit1" />
<br /><br />
Search By Name :
Enter Name : <input type="text" name="name1" />
<br />
<input type="submit" name="submit2" />
</form>
------------------------------------------------------------------------------------


------------------------------------------------------------------------------------
FORMSEARCHRESULT.PHP
------------------------------------------------
<?php

if(isset($_POST["submit1"]))
{
$gender = $_POST["gender1"];
echo $gender;
}


if(isset($_POST["submit2"]))
{
$name = $_POST["name1"];
echo $name;
}
?>
------------------------------------------------------------------------------------

refresh the second page where m sending the value through form -- action . .you will come to know .. how can i store that value to my second page ..

any help will be highly appreciated php masters ..

thanks ..
 
Back
Top