raryre23 Posted April 7, 2008 Share Posted April 7, 2008 I'm a relative beginner to PHP and cant work out what is going on here!! I have some code which works fine in Firefox and Safari but when I tried it on Internet Explorer it doesn't display an image like it does in the other two but it displays nothing. If someone could help me out it would be appreciated! <?php $sql="select * from ratepics where (username= '$username' AND '$hname' = hname)"; $result=mysql_query($sql); $obj=mysql_fetch_object($result); $thumburl=$obj->thumburl; $url=$obj->url; $id=$obj->id; if(mysql_num_rows($result) > 0 ) { ?> <div align="center"> <p><a href= '' onClick="MM_openBrWindow('<?php print $url?>','','')" ><img src="<?php print $thumburl ?>" alt="" name="" width="" height="" border="0"></a></p> <p> </p> </div></td> Quote Link to comment https://forums.phpfreaks.com/topic/99979-code-only-works-in-some-browsers/ Share on other sites More sharing options...
Psycho Posted April 7, 2008 Share Posted April 7, 2008 This is not a PHP problem, this is a problem in the differences between how some browsers interpret HTML code. Specifically the problem is that you are using the height & width parameters, but not giving them any values. IE is interpreting this as if you had set the values to 0. Just remove them, don't understand why you would include the parameters if you don't use them anyway. Quote Link to comment https://forums.phpfreaks.com/topic/99979-code-only-works-in-some-browsers/#findComment-511259 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.