I'm having this problem with a form, I want to get values from post but I could not get it working..Here is my code:
I want when player select CH or EU and click on buttom 'Process' I can get the value with $_POST['reg'].. but I'm always getting 'fill reg'.. like if it was always empty >.<
PHP:
if(!isset($_REQUEST['action']) or ($_REQUEST['action'] != 'final')) {
echo '<form action="?page=form&action=final" method="post" name="form">
<table cellspacing=15 width="80%">
<tr>
<td> <center><b>Select your Region:</b></center> </td>
<td> <select name="reg" id="reg" onChange="alterreg();" style="width:150px">
<option></option>
<option value="EU">Europe</option>
<option value="CH">China</option>
</select></center>
</td>
</tr>
</table>
<input type="submit" id="enter" value="Process" style="display:none;width:150px"/>
</form>
}
else {
if(empty($_POST['reg'])) echo 'fill reg';
else echo $_POST['reg'];
}
I want when player select CH or EU and click on buttom 'Process' I can get the value with $_POST['reg'].. but I'm always getting 'fill reg'.. like if it was always empty >.<