Hey guys,

Having an issue with a webpage I am building. I can get it to save the name of the image, however when I echo it out and im trying to include it as an img src tag it tells me I have a syntax error. I think this has something to do with the '<td>' tags. I'll include the code and you can let me know what you think. Any help would be appreciated!


if (!isset($_SESSION['myusername'])) {
header('Location: index.php');

echo "These are outcomes written by "; echo $_SESSION['myusername'];



        $display = mysql_query("SELECT * FROM outcome WHERE Name ='{$_SESSION['myusername']}' ") 

        echo "<table border='1' cellpadding='10'>";
        echo "<tr> <th> Date</th> <th>Outcome</th> <th>Learning Story</th> <th>Children</th> <th>Picture</th> </tr>";

        while($row = mysql_fetch_array( $display)) {

                echo "<tr>";

                echo '<td>' . $row['Date'] . '</td>';
                echo '<td>' . $row['Record'] . '</td>';
                echo '<td>' . $row['ls']. '</td>';
                echo '<td>' . $row['Kids']. '</td>';
                echo '<td>' "<img src=http://www.yoursite.com/images/".$row['pic'] ."> '</td>';

                echo "</tr>"; 

        // close table>
        echo "</table>";


If you have a solution please post! I am fairly new to all of this so anything that can help will be welcome.


Side note,

I would either like it to display it as the image in the table


Make it automatically into a link that would link to the image.

Thanks again!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.