Jump to content

display image if field =


adzie

Recommended Posts

ok if you have the url in a field then thats all good

set the url to a variable so like $url

 

then do the regular image thing with HTML

 

so like <img src="$url">

 

(I think)

 

so

 

if ( field = 1 ) {

<img src="$url">

} else {

echo "you do not have priviledges to have a picture";

} ;

$query = "SELECT flights.IMAGE

INTO  FLIGHT_IMAGE

FROM  members,

      flights

WHERE  flights.FLIGHT = members.FLIGHT

AND    members.VID      = VID";

 

This is the code I've been given to extract an image dependent on the user ID

 

an example of table below

 

members table

VID  -- this identifies the person

FLIGHT -- The group they belong to

 

flight table

 

FLIGHT -- the flight group

IMAGE -- the url to the image.

 

now assumin this works how can I get the image to display on the screen next to my form fields and will this code pick the correct image for the group?

 

Thanks

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.