justAnoob Posted April 4, 2009 Share Posted April 4, 2009 The following works great and display properly except for the part in the table where I want a letter to appear. The letter is just saved in my images folder on my server. The letter will eventually get a link, but I'm not worried about that right now. look below at the commented sections for what my problem is. <?php echo "<tr><td>"; echo '<img src="' . $row['imgpath'] . '" width="125" alt="" />'; //works good echo "</td><td>"; echo $row['student']; //good echo "</td><td>"; echo $row['description']; //good echo "</td><td>"; echo $row['in_return']; //good echo "</td></td>"; echo '<img src="images/K_little.png">'; //the picture appears,, but not in table format like the rest of echo "</td></tr>"; //rows from mysql. All the info is in mysql, except for the K_little } echo "</table>"; ?> Will this be a problem getting the K_little to appear on the page in the format I would like. Right now the K_little echos above the table and not inside it like the data from mysql. The table will keep displaying students until no more are in the system. So the letter K_little.png picture needs to be displayed in the letter column of the table for each student,,,, Understand??? ------------------------------------------| |student description in return letter | | xxxxx xxxxx xxxx k | | xxxx xxxxx xxxxx k | | xxxxx xxxxx xxxxx k Quote Link to comment Share on other sites More sharing options...
amonk Posted April 4, 2009 Share Posted April 4, 2009 Try this: <?php echo "<tr><td>"; echo '<img src="' . $row['imgpath'] . '" width="125" alt="" />'; //works good echo "</td><td>"; echo $row['student']; //good echo "</td><td>"; echo $row['description']; //good echo "</td><td>"; echo $row['in_return']; //good echo "</td></td>"; echo "<img src=\"images/K_little.png\">"; //the picture appears,, but not in table format like the rest of echo "</td></tr>"; //rows from mysql. All the info is in mysql, except for the K_little } echo "</table>"; ?> The backslashes make PHP ignore them as syntax, just output them. Quote Link to comment Share on other sites More sharing options...
justAnoob Posted April 4, 2009 Author Share Posted April 4, 2009 K_little.png picture is still echoing above the table. Not in the user info column of my table. Quote Link to comment Share on other sites More sharing options...
justAnoob Posted April 5, 2009 Author Share Posted April 5, 2009 K_little.png is just a picture on the server that I want to display, it does not have a image path in mysql. It is this line of code that I want it to display in. I can get it to display, but not in the format that I want. Here is what is does now. <?php echo "<img src=\"images/K_little.png\">"; ?> K K K column 1 column 2 column 3 column 4 xx xx xx xx xx xx xx xx xx this is how I would like it to be column 1 column 2 column 3 column 4 xx xx xx K xx xx xx K xx xx xx K Quote Link to comment Share on other sites More sharing options...
gffg4574fghsDSGDGKJYM Posted April 5, 2009 Share Posted April 5, 2009 ... echo $row['in_return']; //good echo "</td></td>"; echo "<img src=\"images/K_little.png\">"; ... Closing 2 td instead of closing then opening a td Use : ... echo "</td><td>"; ... Next time try validate your html code before posting into a forums for help : http://validator.w3.org/ That kind of error is easly found by the validator 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.