Jump to content

[SOLVED] Can I inser value from mypage.html?src=[value] into a link?


kiowa_jackson

Recommended Posts

Let's say I have an incoming link going to

 

www.mydomain.com/page.html?src=[value]

 

where the value is the id of an ad or whatever. Is it possible to insert this value in to an outbound link on www.mydomam.com/page.html, i.e. is it possible to create a link that will automatically pass on this value to a different page?

 

Thanks

Link to comment
Share on other sites

Not sure if I understand this right, but I'm not looking for a redirect, I want them to be able to see the page, then click the link. So they would come to my page /page.php?srw=[variable]. And then whatever linke they'd click on that page would pass on the variable to the next page. If I understood the above code correctly, that was for redirecting an entire page.

Link to comment
Share on other sites

More information is needed.

 

What do you want to do with the src= ?

 

Do you want to redirect the user, display it in an iframe, log it in a database?

 

What is the goal of this script? Do you want it to simply take what is in src= and create a link from it?

 

It's like the blind leading the blind.

Link to comment
Share on other sites

Sorry.

 

I want a user to come to my page via a link

 

http://www.mysite.com/page.php?src=[value]

 

then I want this user to either click a normal link and/or fill out a form.

 

The form or link (I'd like to do both for different purposes, but whatever is possible) will then send them to a different domain. I want the original variable to be passed on like this:

 

http://www.otherdomain.com?src=[value]

 

So that the original value gets dynamically inserted to the outgoing links.

 

Hope that covers it, thanks for your help

 

 

Link to comment
Share on other sites

Using the $_GET['src'] where needed:

 

<?php

echo '<a href="http://www.someoensdomain.com/?src=' . $_GET['src'] . '">Click Here</a>';
echo '<br /><form method="post" action="site.php?src=' . $_GET['src'] . '"><input type="hidden" src="' . $_GET['src'] . '" name="src" /><input type="submit" name="submit" value="Submit!" /></form>';

?>

 

I think that is what you are looking for...?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.