Hai friends In my PHP CODING i did this <? $image_src = $userinfo [0]["pic"]; $image_src1 =$userinfo [0]["pic_big"]; $image_src2= $userinfo [0]["pic_small"]; ?> <h2> Picture =<img src="<?php echo "$image_src"; ?>" > </h2><br> <h2> Picture(Big)=<img src="<?php echo "$image_src1"; ?>"></h2><br> <h2> Picture(Small)=<img src="<?php echo"$image_src2";?>"></h2><br> After running this coding Iam able to get the uploaded picture SUCCESSFULLY But in case i didn't upload any picture and i run this code means it is displaying error as Errors while loading page from application Runtime errors: HTML error while rendering tag "img": Missing required URLHTML error while rendering tag "img": Missing required URLHTML error while rendering tag "img": Missing required URL for me it want to display no picture has been uploaded So what i want do for this can anybody help me by rectifying this code in PHP
I would disabled HTML errors in php.ini. ini_set('html_errors', '0'); PHP: Or you could do: <?php if (!empty($image_src)) { ?> <h2> Picture =<img src="<?php echo $image_src; ?>" > </h2><br> <?php } ?> PHP: