I am trying to post a html form to itself but somehow i'm not getting results. I have two php files. One file is named form.php and looks like this
<form action = "" method = "post">
First name: <input name ="first_name" type = "test" size = 20" maxlength = "20"><p>
Second name name: <input name ="second_name" type = "test" size = 20" maxlength = "20"><p>
<input name = "submit" type="submit" value = "submit">
</form>
The other one is named names.php and includes form.php
<?Php
if(!isset($_POST['submit'])){
include "form.php";
}
else{
echo $_POST['first_name'];
echo $_POST['second_name'];
?>
The problem is that names are not echoing. I know this looks like a simple problem but funny enough it does not work for me. I'm at my wits end on this one. Is it a browser problem? Is it a html problem or is it a php problem?
Aucun commentaire:
Enregistrer un commentaire