I have a query that executes when I hardcode the username but not when I try to use the session var.
Works:
$q = "SELECT * FROM ".TBL." WHERE username = 'Me'";
Doesn't work:
$q = "SELECT * FROM ".TBL." WHERE username = '$username'";
I have used:
<?php
print_r($_SESSION);
?>
to print out all of my sessions and username is populated so I'm a little confused, is it a syntax issue?
Any help is greatly appreciated
Works:
$q = "SELECT * FROM ".TBL." WHERE username = 'Me'";
Doesn't work:
$q = "SELECT * FROM ".TBL." WHERE username = '$username'";
I have used:
<?php
print_r($_SESSION);
?>
to print out all of my sessions and username is populated so I'm a little confused, is it a syntax issue?
Any help is greatly appreciated