Jump to content

Passing a pin to a form.


whelpton

Recommended Posts

Can anyone explain to me why this system isnt working? I have no clue why it shouldnt be.

 

The pin number is passed from a form to this script, which then determines if a users pin is correct and if so, forwards them onto the relevant page. Otherwise, it returns them to the login.

 

 

<?php 
session_start();

$pin=$_POST['pin'];

if ($pin='7221') {
$_SESSION['pin']='7221';
$_SESSION['name']='Keith D Whelpton';
header('Location: phonesystem.php');
}
elseif ($pin='3585') {
$_SESSION['pin']='3585';
$_SESSION['name']='Luke S Barnes';
header('Location: phonesystem.php');
}
else {
header('Location: phonelogin.php');
}
?>

Link to comment
https://forums.phpfreaks.com/topic/228942-passing-a-pin-to-a-form/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.