| | |
Photo pieces compiled in table
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Apr 2008
Posts: 39
Reputation:
Solved Threads: 1
I'm using PHP to piece together photos on my website. I have the pieces in the correct order, but there is white space between each photo. At the moment, the only Css I have is placing the black border around the specified outer edges of the photo - I added this after the white space problem, so I can't think that it affects it.
Could anyone suggest how to correct this issue?
Problem page: http://www.equinefocus.co.uk/photos/2009-03-21/001.php
Could anyone suggest how to correct this issue?
PHP Syntax (Toggle Plain Text)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Equine Focus</title> <link rel="stylesheet" type="text/css" href="/style/20090330.css"/> </head> <body> <?php // Connects to your Database mysql_connect("*****", "*****", "*****") or die(mysql_error()); mysql_select_db("*****") or die ("Unable to connect to MySQL"); // mysql $data = mysql_query("SELECT * FROM `photos` WHERE date = '2009-03-21' AND ref ='001'") or die ("No data available, please contact the site admin describing where you found this error message."); ?> <table align='center' border='0' padding='0' spacing='0'> <?php while($info = mysql_fetch_array($data)) { // images $image1='/photos/'.$info['date'].'/'.$info['ref'].$info['piece1']; $image2='/photos/'.$info['date'].'/'.$info['ref'].$info['piece2']; $image3='/photos/'.$info['date'].'/'.$info['ref'].$info['piece3']; $image4='/photos/'.$info['date'].'/'.$info['ref'].$info['piece4']; $image5='/photos/'.$info['date'].'/'.$info['ref'].$info['piece5']; $image6='/photos/'.$info['date'].'/'.$info['ref'].$info['piece6']; $image7='/photos/'.$info['date'].'/'.$info['ref'].$info['piece7']; $image8='/photos/'.$info['date'].'/'.$info['ref'].$info['piece8']; $image9='/photos/'.$info['date'].'/'.$info['ref'].$info['piece9']; $image10='/photos/'.$info['date'].'/'.$info['ref'].$info['piece10']; $image11='/photos/'.$info['date'].'/'.$info['ref'].$info['piece11']; $image12='/photos/'.$info['date'].'/'.$info['ref'].$info['piece12']; $thumb='/photos/'.$info['date'].'/thumbs/'.$info['ref']; // ref $ref = $info['date'].'-'.$info['ref']; // write-up $text=$info['horse'].' ridden by '.$info['rider']; ?> <tr> <td><div id='image1'><img src="<?php echo $image1; ?>"</a></div></td> <td><div id='image2'><img src="<?php echo $image2; ?>"</a></div></td> <td><div id='image3'><img src="<?php echo $image3; ?>"</a></div></td> <td><div id='image4'><img src="<?php echo $image4; ?>"</a></div></td> </tr> <tr> <td><div id='image5'><img src="<?php echo $image5; ?>"</a></div></td> <td><div id='image6'><img src="<?php echo $image6; ?>"</a></div></td> <td><div id='image7'><img src="<?php echo $image7; ?>"</a></div></td> <td><div id='image8'><img src="<?php echo $image8; ?>"</a></div></td> </tr> <tr> <td><div id='image9'><img src="<?php echo $image9; ?>"</a></div></td> <td><div id='image10'><img src="<?php echo $image10; ?>"</a></div></td> <td><div id='image11'><img src="<?php echo $image11; ?>"</a></div></td> <td><div id='image12'><img src="<?php echo $image12; ?>"</a></div></td> </tr> <tr><td><span class="refno">Photo Reference: <?php echo $ref; ?></span></td></tr> <tr><td><span class="infotext"><?php echo $text; ?></td></tr></span> </table> <?php } ?> </table></body></html>
Problem page: http://www.equinefocus.co.uk/photos/2009-03-21/001.php
Last edited by Borderline; Mar 30th, 2009 at 7:46 am. Reason: Edited to include link to problem page
![]() |
Other Threads in the PHP Forum
- Previous Thread: Alert
- Next Thread: POST data from one domain to another ?
| Thread Tools | Search this Thread |
.htaccess alerts apache api archive array autocomplete beginner binary broken cakephp checkbox class cms code convert cron curl database dataentry date display duplicates dynamic echo email emptydisplayvalue error execute explodefunction file files firstoptioninphpdroplist folder form forms function functions google hack href htaccess html htmlspecialchars image include insert ip javasciptvalidation javascript joomla keywords limit link login mail matching menu methods mlm multiple mysql network object oop paypal pdf php problem query radio random recursion recursive redirect remote script search securephp server sessions shot sms source space sql subscription syntax system table tutorial tutorials update upload url validator variable video web youtube





