Hi I've asked this before but I still have no idea what to do with this.

I have a SQL database with my members, I have a page which asks them to enter their username and password now on this form I want to to authenticate my member and set the cookies so they can enter my restricted pages.

Also I want to add a code to my pages which will redirect them to the login page if they have not done so so far.

Can anyone help?

I have looked on hotscripts.com al seem to be long as codes with endless useless admin pages ect which mean nothing to me.