Newbie in Servers
The PHP script in the action attribute get downloaded each time i submit the form.
<form action="action.php" method="POST">
The form is in register.html . Files action.php and register.html are both in the same directory /var/www/html which is my current root directory after I installed lamp server. I have another php file containing phpinfo() function which gets executed properly but action.php doesn't work.
My action.php script:
<?php
echo $_POST['name'];
?>
My register.html file:
<!DOCTYPE html>
<html>
<head>
<title>A Simple form</title>
</head>
<body>
<form action="action.php" method="POST">
Name:<br>
<input type="text" name="name" ><br>
Password:<br>
<input type="password" name="password"><br>
<input type="submit" value="Submit"><br>
</form>
</body>
</html>