Jump to content

[SOLVED] Quick Question


Ell20

Recommended Posts

Hi,

 

I have made a login script which redirects.

However depending on whether this is the first time they have logged in depends on which page they get redirected to.

 

This is all working fine but how do I update the database on page load so that they get redirected to the other location from then on?

 

Cheers

Link to comment
Share on other sites

Have an extra field in the database containing their user details - a boolean one called "firstvisit" for example.

 

When they log check if this value has been set. If not set it and direct to the welcome page. If set redirect to a different page.

Link to comment
Share on other sites

I have set it up with an extra value in the DB which stores 0 upon registration and the redirect to the page however what dont no how to do is to set this value to 1 once they have seen it.

 

Cheers

Link to comment
Share on other sites

Simple. Check to see if it is zero when they sign in, and if it is, its their first sign in. Forward them to the second page, and have that page change the value to one in the database. If the value is already one, then forward them to the other page.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.