0_insomniac_0 0_insomniac_0 - 11 months ago 49
PHP Question

external php echo/print_r not outputting values to browser

This is code is saved in a file called form.php



<form acion = "insert.php" method = "POST">
UserName:<br> <input type = "text" name = "uname"/><br>
Password:<br><input type = "password" name = "pswd"/><br>
First Name:<br><input type = "text" name = "fname"/><br>
Last Name:<br><input type = "text" name = "lname"/><br>
<input type = "submit" value = "submit"/>


This code is saved in a file called insert.php in the same folder (xampp/htdocs/aform)

echo "hello world";

$uname = $_POST['uname'];


$pass = $_POST['pswd'];
$first = $_POST['fname'];
$last = $_POST['lname'];

echo $uname;


None of the echo or print_r statements return anything to the browser after the submit button is clicked.

Answer Source

Just correct this (you have a missing 't'):

<form acion = "insert.php" method = "POST">


<form action = "insert.php" method = "POST">