HAve a major concern now.
This is signup.php
The user fills in desired ID, PASS, wheter MALE or FEMALE and last geocraphical place (call it north west, south ...)
index.php
It is on this page the visitor gets info about a randimly picked user. To make it possible to choose the sex of the user and geographical place I use 2 forms:
- 1 pulldown menu where the user choose SEX
- 1 radiobuttonset where he choose location
And one other radiobutton set is finally used for the visitor to click wheter he like or didnt like the users info. This radiobutton is also used to update the page with another users info!!
The SEX pulldown and the geographical radiobutton should have the functionality to remember the choosen values until the user changes it (or simply not browse my webbsite anymore).
The visitor should therefore be able to choose to view info on only MEN and on MEN who are from NORTH and so on... And when the radiobutton to update the page is clicked the page should continue to show info on desired values.
Dont matter if all are combined in to one FORM-tag or whatever, just the funcion works. please help.
code for location radiobuttons:
<?
if (isset($_post['kateg']) and $POST['kateg'] != "")
{
$kategecho = "<input type=\"hidden\" name =\"kateg\" value=\"$kateg\">";
}
?>
<form action="index.php" name="kateg" method="post">
<select name="kateg" onclick="this.form.submit()">
<input type="radio" value="S"<?php echo ($_POST["kateg"] == "S" ? "SELECTED" : ""); ?> name=kateg onclick="this.form.submit()">SOUTH<br>
<input type="radio" value="N"<?php echo ($_POST["kateg"] == "N" ? "SELECTED" : ""); ?> name=kateg onclick="this.form.submit()">NORTH<br>
<input type="radio" value="E"<?php echo ($_POST["kateg"] == "E" ? "SELECTED" : ""); ?> name=kateg onclick="this.form.submit()">East <? echo $kateg; ?>
</form>
code for sex:
<form>
<select name="kon" onchange="this.form.submit()">
<option onchange="this.form.submit()" value="F" <?php echo ($_POST["kon"] == "F" ? "SELECTED" : ""); ?>>Female</option>
<option onchange="this.form.submit()" value="M" <?php echo ($_POST["kon"] == "M" ? "SELECTED" : ""); ?>>MALE</option>
<option value="">Show both</option>
</select>
</form>
and finally the radiobutton that updates the page:
<form action="index.php" name="allform" method="post" onchange="this.form.submit()">
<input type=hidden name=op value=rate>
<input type=hidden name=id value="<? print($id); ?>">
<tr>
<td colspan=3 align=center><table width=350 bgcolor="#CC3333" >
<tr>
<td valign=bottom><input type=radio name=r value=1 onclick="this.form.submit()">
<font size=1 >good</font></td>
<td valign=bottom><input type=radio name=r value=2 onclick="this.form.submit()">
<font size=1 >bad</font></td><input type=hidden name=rate value=1>
</form>
It works pretty good now but when I choose something from the location buttons then it wont update the page after i click the buttons that updates the page, it just struggeling finally showing a 404 error.... Also the sex pulldown always initally is FEMALE....