Forums

PHP

This topic is locked

Display Image and Skip Image Problem

Posted 13 Feb 2002 21:15:21
1
has voted
13 Feb 2002 21:15:21 Pat Heuber posted:
I have the following problem:

I have PHP Upload and a small MySQL Database. If somebody doesn't upload a image to the database, a value <b>nurtext.gif</b> is written to the database.

In this case I would like the detail page not to show the image at all. In the other case the image should display the file which refers to the name in the database.

I tried it like this:

&lt;?
if ($rsWebmasterContent-&gt;Fields("BildURL"&lt;&gt;"nurtext.gif":
<b>???img src="uploadimages/&lt;?php echo $rsWebmasterContent-&gt;Fields("BildURL"?&gt;" width="220" align="left"???</b>
else:
echo "";
endif;

I just don't know how to put the html part right.

Can somebody help me with that.

Replies

Replied 13 Feb 2002 22:01:42
13 Feb 2002 22:01:42 Rick Coleman replied:
Here's what I did - I used PHP Upload and PHP Dyn Img++. I left the field for no image blank inthe PHP Dyn Img++ dialouge. If they submit an image, the name gets written to the database. If the don't, the field is blank. Now I can dynamically resize the image, keep my database happy and not worry if they don't upload an image, the page will take care of itself....
Replied 15 Feb 2002 12:20:04
15 Feb 2002 12:20:04 Pat Heuber replied:
Thank you. This extension is not working with my phpakt v.1.1.3 because of that recordsetphp.htm problem. but for a short period i just renamed the file, so in this case i could use it. and it worked perfectly for me. thank you again !!!

Reply to this topic