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??? Quote Link to comment 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 Quote Link to comment 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? Quote Link to comment 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???? Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 7, 2009 Share Posted May 7, 2009 Haha, can I see your code? Quote Link to comment 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... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.