Alright I have looked through the forums and have tried some of the stuff I have seen but I just can't get this to work
this is the first page
<?php
if (isset ($_POST['submit']) ) { //True if the form is being submitted
session_start();
$datab = @mysql_connect("-010556", "aaadispatch", "aaa");
mysql_select_db("aaadispatch", $datab);
$SQL = "SELECT role FROM peoplez WHERE user = '$username' AND secretCode = '$password' ";
$security = @mysql_query($SQL);
if ( mysql_num_rows($security) ) {
$row = mysql_fetch_array($security);
$security_id = $row['role'];
$sess_role = $security_id;
session_register('sess_role');
header("location: testfiles/welcome.php");
}
}
include '../includes/dbase.php';
include '../includes/header.php';
?>
input form here
Then it should go here
<?php
if ( !session_is_registered('sess_role') ) {
header( "location: testfiles/index.php");
}
?>
rest of the page here
So it should give me the rest of the page stuff but it is simply bringing me back to the form.
Anyone?