I am using form and evaluating it through PHP. Here is my form code:
<form id="LU" method="post" action="">
<select name="Login_Select" id="LT">
<option value="Please Select LType" selected="selected">Please Select Login Type</option>
<option value="Std">Student</option>
<option value="Fac">Faculity</option>
</select>
<div style="padding-top:1.5%" id="Login">
<p id="LID">Group ID: <input id="LL" name="Log" type="text"/></p>
<p id="LP">Password: <input id="LTP" name="Password" type="password" /></p>
<p id="Err">Invalid ID Or Password!</p>
<input type="submit" value="Login" />
</form>
And down in the body tag I have a PHP evaluator code like this:
<?php
if(isset($_POST))
{
print_r($_POST);
?>
But as soon as the page launches it display $_POST array which is empty at that time.
I want that the array will display when user submitted the form so that array has values inserted in text boxes.
To check if a post request has been made, you should use:
(instead of
if(isset($_POST)))