I have another question related this thread. I want to populate the image, and other info from the db with a table, I came up with this:
I want the img in one column[span 2 rows] and the info in the other column.Code:<?php require ('config.php'); $id = mysql_real_escape_string($_GET['id']); $query="SELECT * FROM movie WHERE id='$id'"; $result=mysql_query($query,$connection); $row = mysql_fetch_assoc($result); echo "<table width='580' border='0' cellpadding='0' cellspacing='0'>"; echo "<tr>"; echo "<td rowspan='2'>"."<img src=img/".$row['img_name'].">"."</td>"; echo "<td>". "<strong> Title: </strong>".$row["title"]."</td>"; echo "</tr>"; echo "<tr>"; echo "<td>". "<strong> Origin: </strong>".$row["country"]."</td>"; echo "</tr>"; echo "</table>"; ?>
It's working, but it doesn't look good, I guess. Is there a better way? Pointing me to some tutorial is ok, too.
Thanks a lot!



Reply With Quote
Bookmarks