What I am trying to do is link my gallery and blogs on here, so I need to some how in the database insert a link to that I can click on the images to go a specific page.
ADDED: ALSO I need to format the dates on here, I am using Date in the database and I can not figure out how to format it to (ex. 10-21-2010)
This is the page
http://lettersfromlegends.com/node/3
this is what I have now
PHP Code:
$result = mysql_query("SELECT * FROM Basketball ORDER BY DateReceived") or die(mysql_error());
echo "<table border='0'>"; echo "<tr> <th>Player's Name</th> <th>Date Sent</th> <th>Date Received</th><th>Sent</th> <th>Recieved</th> <th>Letter</th><th>Photo</th> <th>Blog</th> </tr>"; // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo "<tr><td>"; echo $row['FirstName'] . " " . $row['LastName']; echo "</center></td><td><center>"; echo $row['DateSent']; echo "</center></td><td><center>"; echo $row['DateReceived']; echo "</center></td><td><center>"; echo $row['ItemsSent']; echo "</center></td><td><center>"; echo $row['ItemsReceived']; echo "</center></td><td><center>"; echo $row['Letter']; echo "</center></td><td><center>"; echo $row['Photo']; echo '<img src="http://www.lettersfromlegends.com/misc/ico_photo.gif" width="30" height="26" />'; echo "</center></td><td><center>"; echo $row['Blog']; echo '<img src="http://www.lettersfromlegends.com/misc/blog.jpg" width="28" height="24" />'; echo "</center></td></tr>";
}
echo "</table>";
?>
Last edited by NYChaoS; 10-21-2010 at 08:05 PM..
|