Re: [PHP] Re: Session won't pick up one variable (SOLVED)

2009-01-31 Thread Terion Miller
thanks got it fixed: if (!empty($_POST['UserName']) && !empty($_POST['Password'])) { $UserName = $_POST['UserName']; $Password = $_POST['Password']; } *<---was missing a curly bracket..oi syntax* $msg = ''; if (!empty($UserName)) { $sql = "SELECT `AdminID`,`UserName` FROM `admin` WHE

Re: [PHP] Re: Session won't pick up one variable

2009-01-31 Thread Terion Miller
On Fri, Jan 30, 2009 at 5:44 PM, Shawn McKenzie wrote: > Terion Miller wrote: > > Well I changed it because it's not a post since its not coming from a > form > > is this closer? > > > > if (!empty($UserName)) { > > > > Why are you doing this? Only to see if > 0 rows are returned? You can > use

[PHP] Re: Session won't pick up one variable

2009-01-30 Thread Shawn McKenzie
Terion Miller wrote: > Well I changed it because it's not a post since its not coming from a form > is this closer? > > if (!empty($UserName)) { > Why are you doing this? Only to see if > 0 rows are returned? You can use the results you know. > $sql = "SELECT `AdminID`,`UserName` FROM `adm

[PHP] Re: Session won't pick up one variable

2009-01-30 Thread Terion Miller
Well I changed it because it's not a post since its not coming from a form is this closer? 0) { $_SESSION['AdminLogin'] = true; $_SESSION['user']=$UserName; $_SESSION['AdminID']=$AdminID; header ('Location: Main.php'); exit; } else { On Fri, Jan 30, 2