andrew_biggart Posted February 14, 2009 Share Posted February 14, 2009 ok in the last site i had this sussed how ever for some reason this one is being gay.... im using the following code <?php include("config_members.php"); $username=$_GET['username']; // Retrieve data from database $sql="SELECT * FROM User_infoT WHERE Username='$username'"; $result=mysql_query($sql); // Start looping rows in mysql database. while($rows=mysql_fetch_array($result)){ ?> <table> <tr><td class="profile_spacer"></td><td class="profilepicture"><? echo "<img src='Profile_pics/". $rows['Profile_picture'] . "' style='width:100px; height:100px;' />";?></td></tr> </table> obviously i have closed the loop further own but can anyone see any reason why this wouldnt work? it loads the blanc sqaure but no picture loads? Quote Link to comment https://forums.phpfreaks.com/topic/145209-displaying-profile-images/ Share on other sites More sharing options...
printf Posted February 14, 2009 Share Posted February 14, 2009 Do you have short <? tag support on? Quote Link to comment https://forums.phpfreaks.com/topic/145209-displaying-profile-images/#findComment-762223 Share on other sites More sharing options...
MadnessRed Posted February 14, 2009 Share Posted February 14, 2009 can you post the generated html please? (View source) Quote Link to comment https://forums.phpfreaks.com/topic/145209-displaying-profile-images/#findComment-762228 Share on other sites More sharing options...
andrew_biggart Posted February 14, 2009 Author Share Posted February 14, 2009 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> <head> <title>Welcome to www.weloveweed.co.uk | All your stoner resources under one roof</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="../stylesheets/layout_profile.css" /> <link rel="stylesheet" type="text/css" href="../stylesheets/headers.css" /> <link rel="stylesheet" type="text/css" href="../stylesheets/images.css" /> <link rel="stylesheet" type="text/css" href="../stylesheets/inputs.css" /> <link rel="stylesheet" type="text/css" href="../stylesheets/links.css" /> <link rel="stylesheet" type="text/css" href="../stylesheets/styles2.css" /> <link rel="stylesheet" type="text/css" href="../stylesheets/tables.css" /> <link rel="stylesheet" type="text/css" href="../stylesheets/tds.css" /> <style type="text/css"> .style2 { border-width: 0px; } </style> <script type="text/javascript"> <!-- function FP_swapImgRestore() {//v1.0 var doc=document,i; if(doc.$imgSwaps) { for(i=0;i<doc.$imgSwaps.length;i++) { var elm=doc.$imgSwaps[i]; if(elm) { elm.src=elm.$src; elm.$src=null; } } doc.$imgSwaps=null; } } function FP_swapImg() {//v1.0 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length; n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm; elm.$src=elm.src; elm.src=args[n+1]; } } } function FP_preloadImgs() {//v1.0 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array(); for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; } } function FP_getObjectByID(id,o) {//v1.0 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id); else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el; if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c) for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; } f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements; for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } } return null; } // --> </script> </head> <body background="../Layout_images/bg.gif" onload="FP_preloadImgs(/*url*/'../Header_images/enter_forum_h.jpg')"> <div id="wrapper"> <div id="masthead"> <a href="default.php"> <img alt="Homepage" src="../Layout_images/homebutton.gif" width="355" height="65" class="style2" /></a></div> <div id="nav"> <div id="nav_left"> <a class="button1" href="default.php">Homepage</a> <br /> <a class="button2" href="pictures.htm">Pictures</a> <br /> <a class="button3" href="../videos.htm">Videos</a> <br /> <a class="button1" href="recipes.htm">Recipes</a> <br /> <a class="button2" href="diy.htm">D.I.Y</a> <br /> <a class="button3" href="links.htm">Links</a> <br /> <a class="button1" href="contact_us.htm">Contact Us</a> </div> <div id="nav_content"> <img alt="masthead" src="../Layout_images/Banner.jpg" width="697" height="173" /> </div> </div> <div id="container"> <div id="left_col"> <div id="login_header"> </div> <div id="login"> <table> <tr><td class="profile_spacer"></td><td class="profilepicture"><img src='Profile_pics/' style='width:100px; height:100px;' /></td></tr> </table> <table cellspacing="0"> <tr><td class="profile_spacer"> </td> <td class="profileinfoimg"> <img alt="" src="../Header_images/mailme.jpg" width="15" height="15" /></td> <td class="profileinfolinks"><a class="profile_sub" href="message_me.htm">Message me</a></td> </tr> <tr><td class="profile_spacer"> </td> <td class="profileinfoimg"> <img alt="" src="../Header_images/myrecipes.jpg" width="15" height="15" /></td> <td class="profileinfolinks"> <a class="profile_sub" href="my_recipes.htm">My recipes</a></td> </tr> <tr><td class="profile_spacer"> </td> <td class="profileinfoimg"> <img alt="" src="../Header_images/mypictures.jpg" width="15" height="15" /></td> <td class="profileinfolinks"> <a class="profile_sub" href="my_pictures.htm">My pictures</a></td> </tr> <tr><td class="profile_spacer"> </td> <td class="profileinfoimg"> <img alt="" src="../Header_images/myvids.jpg" width="15" height="15" /></td> <td class="profileinfolinks"> <a class="profile_sub" href="my_videos.htm">My videos</a></td> </tr> </table> </div> <div id="new_recipes_header" style="left: 0px; top: 0px"> <h1 class="procats" style="font-weight: normal">Personal Info</h1> </div> <div id="new_recipes"> <table style="width: 100%" cellspacing="0" cellpadding="0"> <tr><td class="proinfo_h">Interests</td></tr> <tr><td class="proinfo">Web designing, getting high & dressing up as a hot dog.</td></tr> <tr><td class="proinfo_h">Makes me happy</td></tr> <tr><td class="proinfo">Smoking bongs & generally when im high</td></tr> <tr><td class="proinfo_h">Makes me sad</td></tr> <tr><td class="proinfo">People being cocks on this site</td></tr> <tr><td class="proinfo_h">Bad Habits</td></tr> <tr><td class="proinfo">Sitting up smoking all night & sleeping all day</td></tr> </table> </div> <div id="new_members"> <h1 class="procats" style="font-weight: normal">Favourite Things</h1> <table style="width: 100%" cellspacing="0" cellpadding="0"> <tr><td class="proinfo_h">Music</td></tr> <tr><td class="proinfo">Indie, house, electro & Chillout</td></tr> <tr><td class="proinfo_h">Movie</td></tr> <tr><td class="proinfo">Half Baked, pineapple express</td></tr> <tr><td class="proinfo_h">Website</td></tr> <tr><td class="proinfo"><a class="profile_site" href="http://www.weloveweed.co.uk">click hear to view</a></td></tr> </table> <br /> </div> <div id="forum"> Weloveweed Forum <br /> <br /> <a href="forum.htm"> <img alt="Enter weloveweed forum" src="../Header_images/enter_forum1.jpg" width="70" height="19" id="img1" onmouseout="FP_swapImgRestore()" onmouseover="FP_swapImg(1,1,/*id*/'img1',/*url*/'../Header_images/enter_forum_h.jpg')" class="style2" /></a></div> <div id="feedback"> <br /> <form method="post"> <table> <tr><td></td></tr> <tr><td class="suggest_headers">Username :</td><td> <input class="comments_user"name="Text1" type="text" style="width: 94px" value="Not Registered" /> </td></tr> </table> <table> <tr><td class="suggest_headers">Comment :</td></tr> <tr><td><textarea class="comments" name="TextArea1" style="height: 76px; width: 171px">Hear at weloveweed mansion we appreciate your feedback, so feel free to add your comments and dont fucking abuse it <3</textarea></td></tr> <tr><td class="comments" style="height: 34px"> <input name="Reset" type="reset" value="D'oh" /><input name="Submit" type="submit" value="Whooohoo" /> </td></tr> </table> </form> </div> </div> <div id="page_content"> <div id="page_content_mainheader"> <table class="status_table"> <tr><td class="status"> <img alt="we love weed weloveweed admins profile" src="../Header_images/theonlyone.gif" /><img alt="" src="../Header_images/buttons2.jpg" width="10" height="10" /><img alt="" src="../Header_images/buttons3.jpg" width="10" height="10" /><img alt="" src="../Header_images/buttons1.jpg" width="10" height="10" /></td></tr> </table> </div> <div id="page_content_spacer"> <div id="page_content_header"> </div> <div id="page_content_content"> <table class="profiletable" style="border-width: 0"> <tr> <td colspan="2" class="status"><br /> </td> </tr> <tr> <td class="profileinfo">Username :</td> <td><a href="profile.php?username=AdMiN">AdMiN</a></td> </tr> <tr> <td class="profileinfo">Location :</td> <td class="profileinfo_h">Manchester, UK</td> </tr> <tr> <td class="profileinfo">Favourite smoking method :</td> <td class="profileinfo_h">Buckets, Lungs & Bongs</td> </tr> <tr> <td class="profileinfo" style="width: 200px" valign="top">Favourite Quote :</td> <td class="profileinfo_quote">" I like a blunt or a big fat cone, but this double barrelled bong is getting me stoned !"</td> </tr> </table> </div> <div id="page_content_spacer"> <div id="page_content_header"> </div> <div id="page_content_content"> <img alt="Top 5 weloveweed Pictures" src="../Header_images/top5.gif" width="200" height="40" /><br /> <br /> <table> <tr><td class="newpics"> <img class ="thumbs" alt="" src="../Thumbnail_images/np1.jpg" width="100" height="100" /> <img class ="thumbs" alt="" src="../Thumbnail_images/np2.jpg" width="100" height="100" /> <img class ="thumbs" alt="" src="../Thumbnail_images/np3.jpg" width="100" height="100" /> <img class ="thumbs" alt="" src="../Thumbnail_images/np4.jpg" width="100" height="100" /> <img class ="thumbs" alt="" src="../Thumbnail_images/np5.jpg" width="100" height="100" /></td></tr> </table> <br /> </div> <div id="page_content_spacer"> <div id="page_content_header"> </div> <div id="page_content_content"> <img alt="About me section" src="../Header_images/aboutme.gif" width="200" height="40" /><br /> <br /> <table class="profileaboutme"> <tr><td class="about">Peace! Hope your enjoying the site as much as I have enjoyed making it for you. I have successfully built all of us stoners a giant online mansion to chill in. <br /> <br /> "Which means that I am the only resident around here who is allowed to kick ass." <br /> <br /> Ok a little about me. I've smoked the sweet sweet Mary Jane for about 8 years now, there's nothing better than smoking joint after joint until it is coming out of your ears. I love to smoke myself into a state of numbness, I can be a cock, sometimes I have an attitude but most of the time im a sound guy. Im originally from Northern Ireland, and I moved to Manchester 4 years ago to go to university and obviously because the weed in Manchester is a lot better and I've been numbing myself ever since. <br /> <br /> This is when i realised that there is no cool sites online where stoners can chat shit & chill so along came the idea to build. weloveweed.</td></tr> </table> <br /> </div> <div id="page_content_spacer"> <div id="page_content_header"> </div> <div id="page_content_content"> <img alt="Why we love weed section" src="../Header_images/whywelove.gif" width="200" height="40" /><br /> <br /> <table class="profileaboutme"> <tr><td class="about">I first fell in love with Mary Jane back in the year 2000 when I was 15 & feeling rebellious against the world. To my surprise weed seemed to straighten me out, make me chill out and not have a fucking care in the world. <br /> <br /> Now im just a part time smoker only on evenings and weekends, but back in the day I was definitely positively a full time smoker especially when I started university. The second I landed in Manchester smoking weed has been the only exercise my lungs have seen in 5 years.</td></tr> </table> <br /> </div> <div id="page_content_spacer"> <div id="page_content_header"> </div> <div id="page_content_content"> <img alt="My blog section" src="../Header_images/myblog.gif" width="200" height="40" /><br /> <table class="blogborder"> <tr> <td> <table class="profileaboutme"> <tr> <td class="blogdate" style="width: 503px">Post made:</td> <td class="blogdate">2009-02-14</td> </tr> <tr> <td class="blogsubject">High timeeeeeeeeeeeeee</td> </tr> <tr> <td class="about" colspan="2"><br /><br />Great news, I've nearly got our new home finished, the end is in sight. I hope everyone is excited to see what i have done to the place. I know you will be as there all your suggestions put into a mansion. There are still a few kinks that i need to iron out so please bare with me and don't complain as i will be able to find all the errors myself. <br /> <br /> Im so excited so I've made a nice big fat blunt to celebrate whop <3 Enjoy !!</td> </tr> </table> </td> </tr> </table> <br /> </div> </div> <br /> </div> </div> </div> </div> </div> <div id="footer"><img alt="" src="../Layout_images/footer_final.jpg" width="881" height="58" /></div> <div id="final_footer"> Copyright <span class="style10">©</span><a class="link" href="http://www.weloveweed.co.uk"> weloveweed.co.uk</a><span> 2009</span><br /> <a class="link" href="terms_conditions.htm">Terms & Conditions</a> | <a class="link" href="legal_disclaimer.htm">Legal Disclaimer</a><span><br /> Web design by <a class="link" href="http://www.andrewbiggart.co.uk/examples.html">BIGdesigns</a> SEO by <a class="link" href="http://www.andrewbiggart.co.uk/">Andrew Biggart</a></span> </div> </div> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/145209-displaying-profile-images/#findComment-762237 Share on other sites More sharing options...
RichardRotterdam Posted February 14, 2009 Share Posted February 14, 2009 maybe the array is all lower case try $rows['profile_picture'] or maybe that array entry doesnt exist in that case try while($rows=mysql_fetch_array($result)){ echo "<pre>"; print_r($rows) echo "</pre>"; Quote Link to comment https://forums.phpfreaks.com/topic/145209-displaying-profile-images/#findComment-762242 Share on other sites More sharing options...
MadnessRed Posted February 14, 2009 Share Posted February 14, 2009 <img src='Profile_pics/' style='width:100px; height:100px;' /> the problem is that $rows['Profile_picture'] appears do be blank, to a print_r($rows) Quote Link to comment https://forums.phpfreaks.com/topic/145209-displaying-profile-images/#findComment-762243 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.