Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Index.html */
- <form action="login.php" method="post">
- <input type="text" name="username" /><br />
- <input type="password" name="password" /><br />
- <input type="submit" name="submit" value="Login" />
- </form>
- /* Login.php */
- <?php
- $username = $_POST['username'];
- $password = $_POST['password'];
- if (!empty($username) && !empty($password)) {
- echo "You entered username:" . $username . " and password:" . $password . ";
- }
- else {
- echo "You have left a field empty.";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement