PHP Login - Remember Me

My configuration file included on each page has this.


My login form currently has,

<label><input name="rememberMe" id="rememberMe" type="checkbox" value="1" /> &nbsp;Remember me</label>

In my PHP login script I have this

$_POST['rememberMe'] = (int)$_POST['rememberMe'];

// if no errors //


And lastly I have this...

if($_SESSION['id'] && !isset($_COOKIE['fourptRemember']) && !$_SESSION['rememberMe'])
    // If you are logged in, but you don't have the rememberMe cookie (browser restart)
    // and you have not checked the rememberMe checkbox:

    $_SESSION = array();

    // Destroy the session

I'm having trouble testing to make sure the remember me is working. I don't think I have it setup correctly and was hoping to see if there were any errors in my code.


Need Your Help

Youtube C# .NET API : Uploading video and getting events when finished

c# youtube c#-2.0

This is the code to upload a video to Youtube using the C# .NET API from a Windows Forms desktop application:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.