Jump to content

Short Url Help!


dingleberry

Recommended Posts

'm trying to set up short urls on my page and what I need to do is insert a url from a parent frame page into an input. So on the child iframe I'm using this to pull the referers url

 

<?php $url="".$_SERVER['HTTP_REFERER']; echo $url; ?> 

 

which works great  Then I want to insert it in an input on the same page

 

$site = my_SITE;
echo <<<HTML
<form method="post" action="">
<input type="text" name="url" value="Insert Here" size="30" />
<input type="submit" value="submit" />
</form>
HTML;

 

Any Help?

Link to comment
https://forums.phpfreaks.com/topic/229698-short-url-help/
Share on other sites

Hi dingleberry,

If you just want to put the URL into the form field you  could do this:

 

<input type="text" name="url" value="$url" size="30" />

 

so long as this piece of code is accessible by the code that writes the form.

 

<?php $url="".$_SERVER['HTTP_REFERER']; echo $url; ?>

 

Cheers,

Fergal

Link to comment
https://forums.phpfreaks.com/topic/229698-short-url-help/#findComment-1183461
Share on other sites

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.