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