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

Ask A Question

Stats

  • Questions 292k
  • Answers 292k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The open_basedir directive does just that : Limit the files… May 13, 2026 at 6:07 pm
  • Editorial Team
    Editorial Team added an answer Flex Formatter provided you have the Flex Eclipse IDE. Also… May 13, 2026 at 6:07 pm
  • Editorial Team
    Editorial Team added an answer I've asked Josh Bloch, and he informs me that it… May 13, 2026 at 6:07 pm

Related Questions

I'm looking to modernize our somewhat archaic process of receiving forms and entering them
I have a test program called ftest. It loads .so files that contain tests
was wondering if there are anyone else here that has signed up with the
I'm a fairly new user of Ankh and Tortoise. Currently ramping up on a
I have a table in database that is having unique id's. I have a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.