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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:46:09+00:00 2026-06-01T00:46:09+00:00

On my website, I have a button which when clicked displays a feedback form

  • 0

On my website, I have a button which when clicked displays a feedback form in a popup window.

I need to pass the url in the PARENT window to a hidden field in the feedback form.

I tried:

<?php $url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; ?>

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

The problem with the above code is that it passes the url of the current window, in my case, the url of the feedback popup window.

How do I pass the url of the parent window to that hidden field?

Many thanks for your help

  • 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-01T00:46:10+00:00Added an answer on June 1, 2026 at 12:46 am

    You can try $_SERVER['HTTP_REFERER'] instead of REQUEST_URI (it gives you current uri)
    but keep in mind that it’s not reliable…

    $url = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'some_default_page.php';
    

    Another way could be something like this …

    $cur_page_url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
    echo '<a href="popup.php?ref='.$cur_page_url.'">Feedback</a>';
    

    and then in popup.php just check if ref query string is set and retrieve its value.

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

Sidebar

Related Questions

On my website I have some javascript which changes the URL by adding #
I have a delete button on my web site which I want to add
I have a button on a website that creates a directory and copys a
I have a website where I have to click a submit button on a
I have website on the server, which is not precompiled (with source code, so
Say I have a website which shows the user ten images and asks them
I'm making an edit button which pops up a modal box with a form
I have a link on my website which opens a html content from a
I have an ASP.NET website and from one of the web pages I need
I have an issue regarding link button, On my website i have got a

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.