Funky348 Posted November 15, 2013 Share Posted November 15, 2013 For my uni project i have created a website for my local rugby team... I have a database of players and in that database i have a column for player photo. I was told to just put the path to the image in the player record which i did (the column is a VARCHAR(255). The path i inserted is H:\WebDesign2\Xampp\htdocs\BedlinogRFC\images\Benji.jpg (the image is definitely where i said it is i copied the path from the properties) My image is isnt displaying just the alt text. I have searched everywhere for fix to my problem but cant find where im going wrong!! Any help will be great. Below is my dreamweaver code: <div class="playerProfilePhotoContainer"> <table height="250" width="299" border="0" cellpadding="3"> <caption> Player Photo </caption> <tr> <td><img src="<?php echo $row_Recordset1['ProfilePhoto']; ?>" alt="Profile Photo of Player"/></td> </tr> </table></div> Quote Link to comment Share on other sites More sharing options...
KaiSheng Posted November 15, 2013 Share Posted November 15, 2013 1) You should fetch all results from database using while ($row = mysqli_fetch_array($result)) 2) The link to output should be , <?php echo "<img src='$picture' width='150px'/>" ?> Take a look and understand it, change your code accordingly. Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted November 15, 2013 Share Posted November 15, 2013 the src=" ... " attribute is the URL where the browser fetches the image from on your server. it is not the file system path where the image is stored at on your server. the URL is relative to your document root/htdocs folder - ref: http://en.wikipedia.org/wiki/Uniform_Resource_Locator Quote Link to comment 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.