View Single Post
Old 09-30-2012, 08:22 PM   PM User | #5
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,662
Thanks: 4
Thanked 2,452 Times in 2,421 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Don't do this without checking for magic quotes. Otherwise I wouldn't be able to add \" as a part of my data.
PHP Code:
$myusername stripslashes($myusername);
$mypassword stripslashes($mypassword); 
Replace it with:
PHP Code:
if (ini_get('magic_quotes_gpc'))
{
     
$myusername stripslashes($myusername);
     
$mypassword stripslashes($mypassword);

This has to occur before the $encrypted_mypassword is set.

MD5 isn't secure no. But if you have instructions to do so, then you follow the instructions. Session's are easy, just go to PHP.net and search for session_start. They will have examples on usage, the only pitfall is the use of header('location') where SID has to be manually applied as it won't include transparent session identifiers if you have it enabled and cookies are not available.
Fou-Lu is offline   Reply With Quote
Users who have thanked Fou-Lu for this post:
Sweden (09-30-2012)