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? Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.