0_insomniac_0 0_insomniac_0 - 1 year ago 67
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">
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download