Jump to content

$_GET command help


phpfreak007

Recommended Posts

I am having difficulty working out how to grab from a URL within a URL a link to an image and display this image on a webpage.

example:

 

http://domainA.com/page1.php?file_image=http://domainB.com/image.jpg

 

I know little of this the code below but this is not working:

 

<?php echo $_GET['file_image']; ?>

 

this just copies the url, whereas I want to display this image.jpg from domainB using image source by grabing it.

<img src=" ">

 

I hope you understand me.

Link to comment
https://forums.phpfreaks.com/topic/233141-_get-command-help/
Share on other sites

  • 1 year later...

I have a new query with reference to above slightly modified.

 

(reference from above: http://domainA.com/page1.php?file_image=http://domainB.com/image.jpg)

 

I now would like to know coding how to insert a hidden field within a simple href URL so that on clicking that URL it goes to the next page with the contents of 'file_image' copied to the end of the URL of the next page so e.g it becomes:

 

http://domainA.com/page2.php?file_image=http://domainB.com/image.jpg

 

I tried the code below but no luck:

 

<a href='page2.php' input type="hidden" name="file_image" value="<?php echo $_GET['file_image']; ?>">page 2</a>

 

Hope it makes sense.

Link to comment
https://forums.phpfreaks.com/topic/233141-_get-command-help/#findComment-1346809
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.