J. Mar J. Mar - 4 months ago 20
HTML Question

Why is it i can't display image? i been trying so many different codes but the image still doesn't display

Why is it i can't display even update image and save it?

I have the following code:

<td>Email Address:</td>
<td><input type='text' name='textead' value="<?php echo $st_row['emailAddress'] ?>"/></td>
<td>Profile Picture:</td>
<td><img src="<?php echo $st_row['picture'] ?>" height="100" width="100"/></td>
/* this is the problem it cant display image */

<td><input type="file" name="textpic" accept="image/*" /></td>
<td><input type='submit' name='btnsave' value='SAVE'></td>
<td><input type='submit' name='back' value='CANCEL'></td>


IMG tag should use this format :

<img src="<?php echo $st_row['picture'] ?>" alt="" />

But $st_row['picture'] should represent a path to the picture after you handled the upload (which means using the PHP code to save the uploaded file on your server).

If this answer is insufficient, please provide more details (like the PHP code..).