Jump to content

Link + Image PHP. Possible?


XeZon87

Recommended Posts

Hi,

 

I'm a novice in php, I've worked around php for a while but I cannot call myself a pro scripter yet. heheh anyways I was wondering if this is possible:

 

link.com/img.php?=image1.jpg = calls up image 1

link.com/img.php?=image2.jpg = calls up image 2

 

it's a basic script that calls up the image (depends on the URL) and yet it will display it in a page with the same template (sort of like header.php and footer.php)

 

I'm pretty sure it possible, if yes, can you link me to a tutorial of it?

 

Thanks for reading and helping me out,

Andrew

Link to comment
https://forums.phpfreaks.com/topic/130062-link-image-php-possible/
Share on other sites

Not sure what you are after. Can you tell me exactly what you want to do?

 

My guess is you want to bring up different images using php to provide its location? Something like this then:

<?php
<img src="<?php echo $imageLocation; ?>" alt="image" />

//$imageLocation can be http://www.yoursite.com/image.jpg
?>

hmm ok let me try to explain it again.

 

in a directory there's:

 

img.php

image1.jpg

image2.jpg

 

I want to link Andy to image1.jpg so the link would be img.php?=image1.jpg

Cindy get to see the image2.jpg so the link would be img.php?=image1.jpg

img.php?=X

X is the image name so whenever I go to img.php?=X link it would display the image according to X

 

and what do you mean by mysql exactly. this is suppose to be a simple php script without the use of mysql. but explain to me what you meant

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.