0

Here is my HTML file:

<div class="col-md-12 justify-center">
            <form action="login.php" method="post">

                <div class="col-md-12">
                    <p class="inline-style">Username:</p>
                    <input class="float-right" type="text" name="login" placeholder="Username" required>
                </div>

                <div class="col-md-12">
                    <p class="inline-style">Password:</p>
                    <input class="float-right" type="text" name="passwd" placeholder="Password" required>
                </div>

                <div class="col-md-12 justify-center">
                    <input type="submit" value="Submit">
                    <input type="reset" value="Reset Form">
                </div>

            </form>
        </div>

It uses a post method and it's action is to login.php, the php file below. I'm trying to take in the username and password and send the data to ANOTHER php file. It hits the first php file and breaks, but I can't figure out why. Here is my PHP file:

<?php
session_start();

$login = $_POST['login'];
$passwd = $_POST['passwd'];

$_SESSION['username'] = $login;
$_SESSION['passwd'] = $passwd;

$goto = 'Location: ./SelectStudents.php';
header($goto);

?>

tinyDanza
  • 96
  • 6

0 Answers0