justAnoob Posted May 6, 2009 Share Posted May 6, 2009 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 More sharing options...
HokieTracks Posted May 6, 2009 Share Posted May 6, 2009 This may help but I'm not sure if it's exactly what you want. http://w3schools.com/php/php_file_upload.asp Link to comment https://forums.phpfreaks.com/topic/157156-solved-php-for-this/#findComment-828104 Share on other sites More sharing options...
Ken2k7 Posted May 7, 2009 Share Posted May 7, 2009 Do you not know PHP or do you not know how to create the image input field? Link to comment https://forums.phpfreaks.com/topic/157156-solved-php-for-this/#findComment-828115 Share on other sites More sharing options...
justAnoob Posted May 7, 2009 Author Share Posted May 7, 2009 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 More sharing options...
Ken2k7 Posted May 7, 2009 Share Posted May 7, 2009 Haha, can I see your code? Link to comment https://forums.phpfreaks.com/topic/157156-solved-php-for-this/#findComment-828136 Share on other sites More sharing options...
justAnoob Posted May 7, 2009 Author Share Posted May 7, 2009 I have a new posted topic..Started new one by accident... Link to comment https://forums.phpfreaks.com/topic/157156-solved-php-for-this/#findComment-828173 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.