Jump to content

[SOLVED] php for this???


justAnoob

Recommended Posts

I have this line located in a table.

<?php
echo '<img src="' . $row['imgpath2'] . '" width="125" alt="" />';
?>

 

As of right now the row in mysql that is named imgpath2 has nothing in it,,, so it just shows a box with a little red x in it.

What I'm looking to do is instead of showing that box with the little red x... I would like a file field box to appear...So then when an image is uploaded(imgpath2),, the picture would then appear and the file field box would be gone..  So something like this...

if imgpath2 is empty...show file field box

else

show picture

 

PHP for this one???

Link to comment
https://forums.phpfreaks.com/topic/157156-solved-php-for-this/
Share on other sites

i know php and how to to create the image input field.

so would i say something like

if imgpath2 is empty, show input field

else, show field...

of course use real php..

 

so to find imgpath2,, I would do a query for imgpath2 and then create a variable from that and then use php to see if it contains a picture or not,, right???? 

Link to comment
https://forums.phpfreaks.com/topic/157156-solved-php-for-this/#findComment-828123
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.