I have three php pages the first page is to enter user details in the fields the second page is to insert user details in the database the third page is to show the user details that have been sent to the database,
everything work fine except in the third page the user details doest not appear and I get this error messages:
Notice: Undefined variable: user Notice: Undefined variable: email Notice: Undefined variable: pass
here is my code:
first_page.php
<form action="second_page.php" method="post" >
User Name:
<input type="text" name="username" >
User Email
<input type="text" name="useremail" >
Password:
<input type="text" name="password" >
<input type="submit" name="submit" >
</form>
second_page.php
if (isset($_POST['submit']))
{
$user= $_POST['username'];
$email = $_POST['useremail'];
$pass= $_POST['password'];
mysql_query("INSERT INTO table (username, useremail, password) VALUES ('$user','$emai','$pass');
header("location: third_page.php");
exit;
third_page.php
$user= $_POST['username'];
$email = $_POST['useremail'];
$pass= $_POST['password'];
echo ' the user name: '.$user;
echo ' the user email:.'$email;
echo 'the user password:.'$pass;