PHP Code Cookies
Posted: Tue May 23, 2006 2:48 pm
HI i need to change my code for rembering username loged in throught script as the way i have done i realise can be edited to view other peoples details
this is the way i did it when they loged in i made a link that said enter the link said enter.php?username=$user
so that the vairable user was following into the enter page so i could use it here like this :
so it got the SQL data for that user eg. enter.php?username=reece
but someone could jus change the username and view ther stuff
please could someone help do this in some other way
thanks reece
this is the way i did it when they loged in i made a link that said enter the link said enter.php?username=$user
so that the vairable user was following into the enter page so i could use it here like this :
Code: Select all
$userfromurl=$_GET['username'];
$sql="SELECT * FROM gameinfo WHERE username ='$userfromurl'";but someone could jus change the username and view ther stuff
please could someone help do this in some other way
thanks reece