Page 1 of 1

session query

Posted: Tue Sep 14, 2004 12:24 pm
by devilgrendall
hi, i need some help with a session problem, ive set up a session to identify peoples passwords+username and will only pull out the editors entries into the database. Question is how do i pull all the editors entries under an administrantion login???? the code below is what im using to identify the user.

Any help or hints much appreciated.
Thanks

Jay

Code: Select all

<?php

	$status = authenticate($f_user,$f_pass);
	
	if ($status == 1)
	{
		
		session_start();
	
		session_register("SESSION");
	
		session_register("SESSION_UNAME");
		$SESSION_UNAME = $f_user;
			
		header("Location: admin.php");
		exit();		
		}
		else
		{
		
		header("Location: error.php?e=$status");
		exit();				
		}

		function authenticate($fuser,$fpass)
		{

		include ("secure/valdata.dac");
		If (mysql_num_rows($result) == 1)
		{
			if (strcmp(mysql_result($result,0,pass),$fpass) == 0 )
			{	
				return 1;
			}
			else
			{
				return 0;
			}
			}
			else
			{
			return 0;
			}
			}

?>
:lol: :lol: :lol:
?>