PHP Session variables
Posted: Mon Oct 10, 2005 12:09 pm
Jcart | Please use
Thanks in advance,
Dan
Jcart | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
I am trying to set the a user varible to filter results on a table. It works when i come from a form via http post but when i do a redirect to this page it says _session is undefined. But i just defined it when i first ran through and it shouldn't lose it's value because it is a session variable. Someone please help...Code: Select all
<? if (isset($_POST['GetUser']))
{
$_SESSION['userid'] = $_POST['User'];
if ($_POST['User'] <> 0){$_SESSION['filter'] = ' where owner_id = ' . $_POST['User'];}
}
?>
<?
$query = 'select * from Project_List '. $_SESSION['filter'] . ' order by CUSTOMER_NAME asc';
?>Dan
Jcart | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]