Jump to content

placing an image path in mySQL and display in using php in dreamweaver trouble


Funky348

Recommended Posts

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>

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.