Jump to content

[SOLVED] One page carrying a link based on url


Sterculius

Recommended Posts

I apologize in advance for the vagueness what I am asking. I am not very fluent in PHP, and I can't seem to find the "Newb" board that is mentioned in the posting FAQ. The reason I'm asking this question is because I am not even sure of what I should be searching for and if this is possible easily...hence why I'm just throwing it out here.

I do updates on an art school web site. They have links to faculty's web sites in their biographies. The school decided that they would like a disclaimer page before a viewer is taken to the faculty member's web site.

Is it possible to have an index.php with some kind of extension like ?url=http://website.com which will then fill in the link under the disclaimer so I don't have to make a new disclaimer page every time a new link gets put up?

Thanks in advance. I'll try to explain more if anybody has further questions on what I am requesting. Just let me know if this is too difficult to worry about because I don't want to make a big deal about it.
Yeah, if the disclaimer page is disclaimer.php, then link to disclaimer.php?url=http://www.website.com.  Then create the variable via the GET method, like this:

[code=php:0]<?
$url = $_GET['url'];
?>

Then just add it into the link, like so:

<?
echo "<a href=$url>$url</a>";
?>[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.