I'm having errors like this in 4 of the text boxes.
<b/><b>Notice</b>: Undefined variable: fname in <b>C:\xampp\htdocs\webpage\phpmyadmin\db\form.php</b> on line <b>..</b><br />
I read about similar problem from here but it didn't work for me.
Where did I make mistake?
<?php
if(isset($_POST['name']) && isset($_POST['password'])&& isset($_POST['fname'])
&& isset($_POST['lname']) && isset($_POST['email'])){
$name = $_POST['name'];
$pass = $_POST['password'];
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$email = $_POST['email'];
$passhash = md5($pass);
}
?>
<form action="#" method="POST">
Name:<br>
<input type="text" name="name" value="<?php echo $name ?>"><br>
Password:<br>
<input type="password" name="password"><br>
Firstname:<br>
<input type="text" name="fname" value="<?php echo $fname ?>"> <br>
Lastname:<br>
<input type="text" name="lname" value="<?php echo $lname ?>"> <br>
Email:<br>
<input type="text" name="email" value="<?php echo $email ?>"><br>
<input type="submit" value="Submit">
</form>