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

  • SEARCH
  • Home
  • 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 6856449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:53:16+00:00 2026-05-27T01:53:16+00:00

Sorry if I didn’t show you the code because I have no idea how

  • 0

Sorry if I didn’t show you the code because I have no idea how to implement it. I just want to know that for instance in YouTube, when you want to make comment on the video, you have to login in, so how to redirect you to the previous video page that you want to make comment. I suppose I need to store the url of the previous page into a session, but if the user didn’t login, can I still keep track of the url, Sorry for my confusion. I want to do it in php, can anyone help me with it, thanks in advance:)

  • 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-27T01:53:16+00:00Added an answer on May 27, 2026 at 1:53 am

    you can simply use something like this too..!!

    when the user need to redirected back to a page., lets suppose he wanted to comment on post.php page but when he tries commenting it will redirect to login if not already logged in., so, during yu redirect him to login page, send a get parameter to login page like

    http://example.in/login.php?redirect_url=http://example.in/post.php

    now handle this get parameter in the login.php page and when the credentials are authenticated you can just redirect him back to the url which is sent through the get parameter..!

    your login.php can be something like this

    $redirect_url = $_GET['redirect_url']; 
    if(authenticated)
    {
      header("Location: $redirect_url");
    }
    else
    {  }
    

    Hope this helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry if I didn't show you the whole code, because I am not sure
I'm sorry, didn't know that Length is computed at construction time!! I got 200
Sorry for this misleading subject, i didn't know how to word better. Because i'm
Sorry I didn't explain My problem correctly , My problem is that I have
Sorry the title isn't more help. I have a database of media-file URLs that
I am sorry I didn't know how to title my question any better, you
Update Sorry. I didn't mean the whole reflection library was off limits. I just
sorry if a similar question has been posted before, i didn't know what terms
I have a dict that I want to convert in JSON using simplejson. How
Sorry i really didn't know how to phrase the question any better but here

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.