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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.