Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 573721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:45:15+00:00 2026-05-13T13:45:15+00:00

Sometime we get link from a site, when we click the invitation link, it

  • 0

Sometime we get link from a site, when we click the invitation link, it just send us to the index page for login(as we are not logged in in that site), when the login finishes, the site just redirect us to the link on which we clicked.

How this can be achieved in php?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:45:15+00:00Added an answer on May 13, 2026 at 1:45 pm

    Let’s say the “destination page” as called “a.php” ; here’s a possible way of doing what you’re describing :

    • You first call a.php from your browser
      • a.php detects you are not logged in
      • it redirects you to index.php, with a parameter in the URL telling index.php you should be redirected to a.php when logged-in
      • the redirection is done using the header function, with a Location header that points to something like http://yoursite.com/index.php?destination=a.php
    • On index.php, you deal with the logging-in mecanism
      • i.e. a form, with a hidden field, in which the $_GET['destination'] is stored (properly escaped, of course)
      • That form posts to either index.php (i.e. itself) or another page ; doesn’t quite matter.
    • When the logging-in form is posted :
      • you check the credentials
      • if login+password are OK :
        • if there is a destination field in the form’s data, you redirect the user to the corresponding page
        • else, you redirect the user to a default page.
        • Of course, it might be interesting to check the content of the destination field, to make sure you are only accepting redirection to a “valid” page (the definition of “valid” can change — but can at least mean “a page on your site”)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get a query working that takes the values (sometimes just the
Sometimes I get a broken background in Chrome. I do not get this error
Sometime I see many application such as msn, windows media player etc that are
On my web site I would like to have several sub-domains. Files that create
Sometimes when I get input from a file or the user, I get a
When running my application I sometimes get an error about too many files open
When building a VS 2008 solution with 19 projects I sometimes get: The GenerateResource
I call my JavaScript function. Why do I sometimes get the error 'myFunction is
Sometimes I get Oracle connection problems because I can't figure out which tnsnames.ora file
I want to write to/delete a file but sometimes I get a crash if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.