How to write a php code for the form username & password and what's the code for the...

ahmed s

New member
...username & passowrd file? Hi I'm trying to write the code belwo for the php form:
<body>
<html>
<form action="userandpass.php" method="post">
First name:
<input type="text" name="firstname" />
<br />
Last name:
<input type="text" name="lastname" /> <br/>
<input type="submit" value="submit" />
</form>
</body>
</html>

so I want to put the username and password inside the file userandpass.php and when i click on the submit button the system will go and check the username and password from userandpass.php file so would you please help me on what should I put write inside the userandpass.php file, I have checked with this but it's not working :
<html>
<body>
Welcome <?php echo $_POST["fname"]; ?>!<br />
</body>
</html>
Thanks and have a nice day :)
 
Back
Top