J. Mar J. Mar - 6 months ago 41
CSS Question

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

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

<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..).