how to load a picture with php page?

i’ll explain. I have a database with links of pictures (the pictures is in other sites).
i need to make something like that:

what should be in index.php (expect of pulling the link to the image) so it will work?

Hope this gets you going along the right track

[php]<?php
$id = $_GET[‘id’];

// Search database where image link id = $id and return the link.
$link = mysql_query();

echo (’’);
?>[/php]

Have you uploaded these pictures via your site and in the same process added that url to your database… if so…HOW?

I only have an upload to server but I would like to link uploaded pictures to relevant job material in my database…

“need a new job” :wink:

i need to let people have a signature in forums which replace randomly…
i know how to did what you suggested. but i need to know a way to put only the url of the php page which does what u wrote in an img src (specially in forum with the -> [img]). i try to do it just how u did it in to put it as php page on forum page, but it didn’t work… i need to let the page to know somehow that i want to print a picture.

the second respond - no i didn’t do what u think, i just insert a random links from the internet.

So you want the image to be displayed in the forum?
So… place it in the image tags where the people write their post?

To add it to text they have already typed you need to use javascript.
Tell me if this is what you mean and ill get you the code.

not exactly… i want to build a php page that chose random picture.
lets call it pic.php.
i want to let people put it in forums like that:
[img]…/pic.php…
and i need it to operate the php page, chose a picture randomly and print the picture in the forum.

You will have to have them copy and paste it.
You can do some autoselect all and copy onclick with javascript.

So just included the image link in the form value with the [img] tags included.

You can’t actually link the [img] as a .php page because the forums BBCode wont be setup to accept it which is just aswell because people would included php pages to run malicious code etc if they wanted to.

Sponsor our Newsletter | Privacy Policy | Terms of Service