irkevin Posted August 14, 2007 Share Posted August 14, 2007 Hi people, I read every post on this forum about displaying picture from database and so on and it didn't solve my problem, that's why im here making this topic i want to display a picture on my website i have the picture on my server, and i have the link in my database.. then i echoed the link in <img src= ... it displays well in firefox.. it's very nice.. but in internet explorer it's like there were another picture but who's not showing up !! see what i mean? well here's my link http://www.mu-anime.com in the multimedia section, just click on bleach just have a look in firefox and then in internet explorer.. you'll see the problem in internet explorer :S well, So, i have a menu on my site.. like this Bleach DeathNote Dragon Ball etc etc etc etc when i click on bleach, it goes on a page name multimedia.php, there it shows the data which i inserted in mysql database.. and i have also a paging system which works fine. the only thing which bothers me is the way the picture is showing in Internet Explorer :-\ :'( here's the code which shows some information and the picture also while($myarray = mysql_fetch_array($sql)){ // Build your formatted results here. echo $myarray['synopsis']."<br /><br />"; echo "<img src='" .$myarray['file_picture']. "' align=\"right\" alt=\"\" />"; echo "<font color=\"#3399FF\">Episode:</font>" . " " .$myarray['file_name']."<br />"; echo "<font color=\"#3399FF\">Title:</font>" . " " .$myarray['file_description']."<br />"; echo "<font color=\"#3399FF\">Link:</font>" ." ". "<a href=\"".$myarray['file_link']. "\" target=\"_blank\">Click Here To Download</a>"; } and here's the full page code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <link rel="stylesheet" type="text/css" href="anime.css" /> <title>Mu-anime - Anime Resource For Mauritius - Download For Free</title> <style type="text/css"> <!-- #Layer1 { position:absolute; width:659px; height:506px; left: 155px; top: 145px; } --> </style> </head> <body> <table width="200" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="ban.jpg" alt="" width="979" /></td> </tr> </table> <table width="981" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <th width="979"><div align="right" class="style1"><a href="index.php" class="hlink">Home</a> - <a href="http://www.mu-anime.com/reg.php">Register</a> - <a href="mailto:contact@mu-anime.com">Contact</a></div></th> <td width="2"></td> </tr> </table><br /> <table width="131" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <th width="131" height="18" valign="top" id="menu"><div align="left" class="style1">Main Menu</div></th> </tr> <tr> <td height="65" valign="top" class="style1" id="boxcontent"><a href="http://www.mu-anime.com">Home</a><br /> Download<br /> <a href="animelist.html" onClick="window.open('animelist.html','list','width=350, height=450,scrollbars');return false">Anime List</a><br /> <a href="mailto:contact@mu-anime.com">Contact</a><br /> <a href="memberlist.php" onClick="window.open('memberlist.php','members','width=350,height=450,scrollbars');return false">Memberlist</a><br /> Info</td> </tr> </table> <div id="Layer1" align="center"> <p id="title" align="center">Welcome to Mu-Anime</p> <p align="left" id="items"><?php //connect to database $conn = mysql_connect("localhost","irkevin","nightwish"); mysql_select_db("kevin",$conn); // If current page number, use it // if not, set one! if(!isset($_GET['page'])){ $page = 1; } else { $page = $_GET['page']; } // Define the number of results per page $max_results = 6; // Figure out the limit for the query based // on the current page number. $from = (($page * $max_results) - $max_results); // Perform MySQL query on only the current page number's results $temp_go_to = $_GET['go_to']; $sql = mysql_query("SELECT * FROM multi_file WHERE mult_id = $temp_go_to LIMIT $from, $max_results"); while($myarray = mysql_fetch_array($sql)){ // Build your formatted results here. echo $myarray['synopsis']."<br /><br />"; echo "<img src='" .$myarray['file_picture']. "' align=\"right\" alt=\"\" />"; echo "<font color=\"#3399FF\">Episode:</font>" . " " .$myarray['file_name']."<br />"; echo "<font color=\"#3399FF\">Title:</font>" . " " .$myarray['file_description']."<br />"; echo "<font color=\"#3399FF\">Link:</font>" ." ". "<a href=\"".$myarray['file_link']. "\" target=\"_blank\">Click Here To Download</a>"; } // Figure out the total number of results in DB: $total_results = mysql_result(mysql_query("SELECT COUNT(*) as Num FROM multi_file WHERE mult_id = $temp_go_to"),0); // Figure out the total number of pages. Always round up using ceil() $total_pages = ceil($total_results / $max_results); // Build Page Number Hyperlinks echo "<center>Select a Page<br />"; // Build Previous Link if($page > 1){ $prev = ($page - 1); echo "<a href=\"multimedia.php?go_to={$temp_go_to}&page=$prev\">Previous</a> "; } for($i = 1; $i <= $total_pages; $i++){ if(($page) == $i){ echo "$i "; } else { echo "<a href=\"multimedia.php?go_to={$temp_go_to}&page=$i\">$i</a> "; } } // Build Next Link if($page < $total_pages){ $next = ($page + 1); echo "<a href=\"multimedia.php?go_to={$temp_go_to}&page=$next\">Next>></a>"; } echo "</center>"; ?> </div> <br /> <div id='layer' style="position: absolute; top: 146px; left: 851px; width: 135px; height: 400px; z-index: 1"> <table width="131" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <th width="131" height="18" valign="top" id="menu1"><div align="left" class="style1">Statistics</div></th> </tr> <tr> <td height="65" valign="top" class="style1" id="boxcontent1"><? require('config.php'); $connection = @mysql_connect($server, $dbusername, $dbpassword) or die(mysql_error()); $db = @mysql_select_db($db_name,$connection)or die(mysql_error()); $num_users= "SELECT username FROM authorize"; $num_users_res = @mysql_query($num_users, $connection) or die(mysql_error()); $number = mysql_num_rows($num_users_res); echo "registered: $number"; ?><br /> <?php include('config.php'); include('functions.php'); mysql_connect($server, $dbusername, $dbpassword); mysql_select_db("$user_online"); $uname = $_SESSION[user_name]; if ($uname=='') { $guest = 1; } else { $guest = 0; } $ip = $_SERVER["REMOTE_ADDR"]; $time = time(); $page = $_SERVER["PHP_SELF"]; $query = "SELECT * FROM user_online WHERE ip = '$ip'"; $result = mysql_query($query); if (mysql_num_rows($result) == 1) { $query2 = "UPDATE user_online SET uname='$uname',time='$time',file='$page',guest='$guest' WHERE ip = '$ip'"; $result2 = mysql_query($query2); } else { $query2 = "INSERT INTO user_online (`uname`, `ip`, `time`, `file`, `guest`) VALUES ('$uname', '$ip', '$time', '$page', 'guest')"; $result2 = mysql_query($query2); } $time3 = time() - 300; $query3 = "DELETE FROM user_online WHERE time < $time3"; $result3 = mysql_query($query3); $query4 = "SELECT * FROM user_online WHERE guest = '1'"; $result4 = mysql_query($query4); $guestonline = mysql_num_rows($result4); $query5 = "SELECT * FROM user_online WHERE guest = '0'"; $result5 = mysql_query($query5); $memonline = mysql_num_rows($result5); $totalonline = $guestonline + $memonline; echo "Guests: $guestonline<br /> Members: $memonline<br /> Total: $totalonline<br /><br />"; ?></td> </tr> </table><br /> <table width="131" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <th width="131" height="18" valign="top" id="menu4"><div align="left" class="style1">Goodies</div></th> </tr> <tr> <td height="65" valign="top" class="style1" id="boxcontent4">Francois Perusse</td> </tr> </table><br /> <table width="131" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <th width="131" height="18" valign="top" id="menu5"><div align="left" class="style1">Our Friends </div></th> </tr> <tr> <td height="65" valign="top" class="style1" id="boxcontent5"><div align="center"><a href="http://www.nubaz.com" target="_blank"><img src="Smallnubaz.gif" alt="" width="111" height="22" border="0" /></a><br /> <a href="http://www.mo3stuff.com" target="_blank"><img src="mo3stuff.jpg" alt="" width="111" height="22" border="0" /></a></div></td> </tr> </table><br /> <table> <tr> <td height="65" valign="top" class="style1"> <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" /> </td></tr> </table> </div> <table width="131" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <th width="131" height="18" valign="top" id="menu3"><div align="left" class="style1">Multimedia</div></th> </tr> <tr> <td height="163" valign="top" class="style1" id="boxcontent3"><?php //connect to database $conn = mysql_connect("localhost","irkevin","nightwish"); mysql_select_db("kevin", $conn); $sql = "Select * from multimedia"; $result = mysql_query($sql, $conn) or die(mysql_error()); while($myarray = mysql_fetch_array($result)) { ?> <a href=multimedia.php?go_to=<?php echo $myarray['mult_id']; ?> > <?php echo $myarray['mult_name']; ?></a> <br /> <?php }; ?> </td> </tr> </table><br /> <table width="131" border="0" cellpadding="0" cellspacing="0"> <tr> <th width="131" height="18" valign="top" id="menu2"><div align="left" class="style1">Login Area</div></th></tr> <tr> <td height="51" valign="top" class="style1" id="boxcontent2"> <?php if (!$_SESSION[user_name]) { include('login.html'); } else { echo "Welcome " . $_SESSION['user_name']."<br />"; echo "<br />"; echo $_SESSION['last_login']. "<br />"; echo "<br />"; echo "<a href=logout.php>Logout</a>"; } ?> </td> </tr> </table> <div id="Layer2" align="center" style="position: absolute; left: 152px; width: 687px; z-index: 1; top: 659px;"> <p id="info">Website designed & coded by Tipa<br /> <a href="http://www.mu-anime.com">Mu-anime©</a><br /> Hosted by <a href="http://www.infolad.com" target="_blank">[infolad Ltd]</a></p> </div> </body> </html> Sorry if this seems long .. hope you can help me in internet explorer it's just showing some 28 x 30 unvailable pictures :S Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/ Share on other sites More sharing options...
irkevin Posted August 14, 2007 Author Share Posted August 14, 2007 i think the problem is that for the pagination, i have set it to show 6 per page, and now it's trying to show one picture for all of them.. i'm saying this because when i go on the 5th page for bleach, there's only the picture and one of the kind of unavailable picture, and there are only two info on the 5th page :S Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323206 Share on other sites More sharing options...
irkevin Posted August 14, 2007 Author Share Posted August 14, 2007 No one to help ??? Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323212 Share on other sites More sharing options...
irkevin Posted August 14, 2007 Author Share Posted August 14, 2007 wow still no one in this huge forum :S ok then :s Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323340 Share on other sites More sharing options...
PhaZZed Posted August 14, 2007 Share Posted August 14, 2007 On the bleach page, there are 6 results shown, and IE shows 5 missing images and 1 visible image. Without going through all your code, I would say that somewhere inside a loop, you are echoing <img src=""> but without it pointing to correct images.. Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323379 Share on other sites More sharing options...
irkevin Posted August 14, 2007 Author Share Posted August 14, 2007 but im only echoing the path to the image, that's all .. i have the picture on my server and the link in my database.. then i use echo "<img src='" .$myarray['file_picture']. "' align=\"right\" alt=\"\" />"; but it shows five missing images :S Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323385 Share on other sites More sharing options...
PhaZZed Posted August 14, 2007 Share Posted August 14, 2007 It's inside the while loop though, which loops 6 times.. Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323389 Share on other sites More sharing options...
irkevin Posted August 14, 2007 Author Share Posted August 14, 2007 which loop are you refering to? you mean the number of items im showing per page? can you put the code there plz? im totally lost Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323392 Share on other sites More sharing options...
gurroa Posted August 14, 2007 Share Posted August 14, 2007 Make sure you're not missing file_picture values in the db. while($myarray = mysql_fetch_array($sql)){ // Build your formatted results here. echo $myarray['synopsis']."<br /><br />"; if (!empty($myarray['file_picture'])) { echo "<img src='" .$myarray['file_picture']. "' align=\"right\" alt=\"\" />"; } echo "<font color=\"#3399FF\">Episode:</font>" . " " .$myarray['file_name']."<br />"; echo "<font color=\"#3399FF\">Title:</font>" . " " .$myarray['file_description']."<br />"; echo "<font color=\"#3399FF\">Link:</font>" ." ". "<a href=\"".$myarray['file_link']. "\" target=\"_blank\">Click Here To Download</a>"; } Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323393 Share on other sites More sharing options...
irkevin Posted August 14, 2007 Author Share Posted August 14, 2007 the file picture value is aslo there .. im working on this problem since this morning Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323396 Share on other sites More sharing options...
irkevin Posted August 14, 2007 Author Share Posted August 14, 2007 just for info, the row for the picture looks like this Field Type Collation Attributes Null Default Extra file_picture varchar(50) latin1_swedish_ci No and i put the link like this http://www.mu-anime.com/bleach.jpg Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323408 Share on other sites More sharing options...
irkevin Posted August 14, 2007 Author Share Posted August 14, 2007 hey it works.. i added the if statement if (!empty($myarray['file_picture'])) { echo "<img src='" .$myarray['file_picture']. "' align=\"right\" alt=\"\" />"; } thanks gurroa and thanks PhaZZed for taking the time to read my post.. you saved the day Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323410 Share on other sites More sharing options...
gurroa Posted August 14, 2007 Share Posted August 14, 2007 And have you put the link to every row? It seems that only first entry has the file_picture field and synopsis field filled. Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323412 Share on other sites More sharing options...
irkevin Posted August 14, 2007 Author Share Posted August 14, 2007 i just wrote the row of the picture here.. the other field are not empty.. i has the file_name file_description file_link also now there's another problem, on the past page of bleach, i didn't insert any data for bleach after the 25th episode, but it's showing like i add something, and the link is going to the multimedia page.. have a look at the 5th page.. and i wonder why the picture is here too :S Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323415 Share on other sites More sharing options...
gurroa Posted August 14, 2007 Share Posted August 14, 2007 Your multi_file table consist at least of fields mult_id synopsis file_picture file_name file_description file_link first row for bleach is mult_id => '1', synopsis => 'Ichigo Kurosaki ... SEE anime', file_picture => 'http://www.mu-anime.com/bleach.jpg', file_name => 'Bleach Episode 1', file_description => 'The day I became a shinigami', file_link => 'http://www.megaupload.com/?d=IASUWFNF' second and others has only filled: mult_id, file_name, file_description, file_link You should change your dbase. My opinion is to split your table into two multi_file - mult_id, synopsis, file_picture sub_files - mult_id, file_picture, file_name, file_description, file_link Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323422 Share on other sites More sharing options...
irkevin Posted August 14, 2007 Author Share Posted August 14, 2007 but here i can see episode 1 of bleach perfectly. with the synopsis..the file_name, file_des and file link for it.. even for episode 2,3,4,5 and etc i tried it on firefox and IE, i see all episode along with their description and link :S Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323425 Share on other sites More sharing options...
irkevin Posted August 14, 2007 Author Share Posted August 14, 2007 i think it's solved somehow, there were two other row in my table. don't know where they come from :S gurroa i still don't get you. what do you mean by "second and others has only filled: mult_id, file_name, file_description, file_link" ?? what you mean by second? second episode for bleach? or u mean the other anime?? Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323491 Share on other sites More sharing options...
gurroa Posted August 14, 2007 Share Posted August 14, 2007 I meant second and others rows for bleach Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323507 Share on other sites More sharing options...
irkevin Posted August 14, 2007 Author Share Posted August 14, 2007 well everything is fine there. with firefox and internet explorer also. it looks like this Episode: Bleach Episode 1 Title: The day I became a shinigami Link: Click Here To Download Episode: Bleach Episode 2 Title: A shinigami's work Link: Click Here To Download Episode: Bleach Episode 3 Title: The older brother's wish, the younger sister's wish Link: Click Here To Download and so on. do you see it like this? Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323597 Share on other sites More sharing options...
irkevin Posted August 14, 2007 Author Share Posted August 14, 2007 bump can someone go on my site and tell me if you see it the way i posted it there plz? Quote Link to comment https://forums.phpfreaks.com/topic/64787-image-display-nice-in-firefox-but-bad-in-internet-explorer-youll-laugh-lol/#findComment-323905 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.