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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:11:10+00:00 2026-06-09T01:11:10+00:00

I have this <a href=’#?title=sample&url=sample.com’></a> on the same page I put $title = $_GET[‘title’];

  • 0

I have this

<a href='#?title=sample&url=sample.com'></a>

on the same page I put

$title = $_GET['title'];
$url = $_GET['url'];

but it doesn’t passes the values.
what’s wrong with the code?
help please!

NOTE:
I wanted not to reload the page that’s why i put # because at the later part I will call a javascript function onclick

here’s the function call onclick

<script language="JavaScript">
function overlay() {
el = document.getElementById("overlay");
el.style.visibility = (el.style.visibility == "visible") ? "hidden" : "visible";
}
</script>

where the element “overlay” must contain the value of

$title = $_GET['title'];
$url = $_GET['url'];
  • 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-09T01:11:12+00:00Added an answer on June 9, 2026 at 1:11 am

    I think you need to remove the hash (#) from your URL. If you need the hash tag in your URL, it must at the end of the URL:

    mydomain.com?id=1#tag
    

    If you place the hash before the querystrings like you have, you are basically telling the browser to find an element/target called “?title=sample&url=sample.com”, which it probably won’t like.

    For your updated question:

    I think you are better off using the link to call your javascript function, instead of adding querystring values to you URL like you have. For PHP to be able to get these values, the page would have to reload/send request to the server. If you do not want the page to reload, I suggest you change your link to this:

    <a onclick="overlay('This is the title','www.domain.com')">
    

    and then have a function:

    function overlay(theTitle, theURL) {
      el = document.getElementById("overlay");
      el.style.visibility = (el.style.visibility == "visible") ? "hidden" : "visible";
      el.innerHTML = theTitle+'<br>'+theURL;
    }
    

    This means you can get the values you wanted without refreshing the page.

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

Sidebar

Related Questions

I have got this link: <a href=http://iml.com/wmaster.ashx?WID=124904080515&amp;cbname=liveealve&amp;LinkID=701&amp;queryid=138&amp;from=freevideo6&amp;promocode=BETLNK&amp;FRefID=-1&amp;FRefP=none&amp;FRefQS=none rel=nofollow title=Visit imLive.com target=_blank class=sitelink_external imlive>Visit imLive.com</a>
I have got this html on the page: <a href=review.asp?sitename=webcamking#video_embed class=tutorials data_site=webcamking>&nbsp;&nbsp;Tutorial 1</a> This
I have this code: $('.be-delete').live('click', function(e){ e.preventDefault(); var object =$(this); var url = $(this).attr('href');
Hello! I have this script: URL = http://www.hitmeister.de/ page = urllib2.urlopen(URL).read() soup = BeautifulSoup(page)
I have this: $(a.money).colorbox({href:$(a.money).attr(href)+ div#content}); Which opens an overlay but only of the content
I have this code: var guestid = $(this).attr('href'); This gets me the current url,
i have this code $(document).ready(function () { $('a').click(function(e) { e.preventDefault(); url = $(this).attr('href'); $(body).load(href);
I have this atm: <a href=<%= Url.RouteUrl(UserDelete, new { userID = item.UserID }) %>
I have this html. <a class=link href=www.website.com?id=233253>test1</a> <a class=link href=www.website.com?id=456456>test2</a> How can I hide
I have this code: <script> $(document).ready(function () { $('#lnk').click(function(e) { e.preventDefault(); url = $(this).attr('href');

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.