| | |
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: 41
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 ?
Views: 278 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl customizableitems database date directory display download dynamic echo email error file files folder form format forms forum function functions google headmethod href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail malfunctioning menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search select server sessions sms soap source space speed sql structure syntax system table tutorial update updates upload url validation validator variable video web xml youtube





