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 8259745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:56:06+00:00 2026-06-08T02:56:06+00:00

If someone wishes to comment on any item e.g. and article or forum item,

  • 0

If someone wishes to comment on any item e.g. and article or forum item, etc. on my site. It prompts them to login/create account. Is it possible to make sure that when the client logs in it takes them back to the comment they wanted to make?

But now it’s going not like this flow. The user not logging in redirects to the login page, but I want, after logging in to this section, the user is automatically redirected to the current post comment area. Is there a way?

<?php if ($sessionUser == 1 || $sessionSeller == 1 || $sessionadmin == 1) { ?>

    <form class="cp_form"
          action="article_comments_db.php"
          method="post"
          name="frm_comment"
          id="frm_comment">

        <div id="div_req_comment" class="cp_infopanel_off">
            <span><?= $_Reviews ?></span>:<span class="red">*</span>

            <textarea class="cp_textarea"
                      id="req_comment"
                      name="req_comment"
                      onBlur="do_blur(this.id)"
                      onFocus="do_focus(this.id)"></textarea>

            <div id="infobox_req_comment" class="cp_infobox"></div>
        </div>

        <input type="button"
               id="btn_submit"
               class="rp_button"
               value="<?= $_Submit ?>"
               onClick="validate_form('frm_comment')" />

        <input type="hidden"
               name="id" value="<?php echo $id ?>" />
    </form>

<?php } else {
?>

    <br/><br/>
    <div align="right">

        <input type="button"
               id="btn_submit"
               class="rp_button"
               value=" <?= $_Post_comment ?> "
               onClick="window.location.href='login.php?event=Account'" />
    </div>

<?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-06-08T02:56:08+00:00Added an answer on June 8, 2026 at 2:56 am

    You could call your login.php?event=Account with an ID or the URL (urlencode) of the current page visited by the user.

    login.php?event=Account&visitedpageid=1
    

    In the loginform you could fetch the ID/URL with $_GET and put it in a hidden input.

    <input type="hidden" name="visitedpage" value="<?php echo $_GET['visitedpageid']; ?>">
    

    If login was correct, you then redirect by using the POST-value of that hidden input.

    $_POST['visitedpage']
    

    Please make sure you check if the get-parameter is set (isset) and matches to an existing page.

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

Sidebar

Related Questions

Someone has asked the exact same question in April, without any answer. But since
Someone can give me short explanation how to create bitmap runtime using GDI/GDI+ and
I have a form where blocks of HTML are added dynamically when someone wishes
Someone know if it's possible to change the color of a pixel in a
I recently launched CodeIgniter based website for someone who wishes to be advertised and
Someone help me please. Here's the thing, I need to create three dropdown lists
someone could help me solve this problem in the login redirection? the browser says
Someone explain why the next code returns a pointer inside ntdll.dll? GetProcAddress(LoadLibraryA(kernel32.dll), EncodePointer); GetProcAddress(LoadLibraryA(kernel32.dll),
Someone recently taught me a useful thing: in css you can write the following:
Someone brought up the MySQLi multi_query function in an answer claiming that it would

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.