dingleberry Posted March 5, 2011 Share Posted March 5, 2011 '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 More sharing options...
Fergal Andrews Posted March 6, 2011 Share Posted March 6, 2011 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.