Jump to content

[SOLVED] Url


gaurav

Recommended Posts

I am totally new in php.

I am building a web site that has user id and password necessary for every work.

now the problem if a user give a direct url of addcontent page for which login is necessary

in my case user is getting that page directly

but what i want , first user will get a login page then he will be directed to addcontent page

please help me out

 

gaurav

Link to comment
https://forums.phpfreaks.com/topic/153884-solved-url/
Share on other sites

Store a "logged in" variable in your session or cookie (wherever you store you login info).  If the user is not logged in, redirect (header) the user to the login page and store the link they were going to in a field on the login form.  When they login, redirect them again to the page they were going to.

Link to comment
https://forums.phpfreaks.com/topic/153884-solved-url/#findComment-808765
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.