cjbeck71081 Posted December 20, 2006 Share Posted December 20, 2006 I have been working on this page all day with help from everyone in the forum. But as i figure one thing out, and turn a corner, the next thing hits me, that ive never seen before.take a look at this page, i cannot figure out what is wrong. Every few times the page is loaded, it loads just fine, just as I want it to. But if you hit F5 to reload it a few times, the two images (which are supposed to be near each other, are pushed away from each other. I tried to put restraints on the table width, but it doesnt seem to do any good.www.epicri.com/bdd/form3.phpHere is the code. Thanks for your help guys, if it werent for the nice people that post, i wouldnt be nearly finished with this.[code]<?php$hostname = "xxxxx";$username = "xxxxx";$password = "xxxxx";$usertable = "bddtable";$dbName = "epicr001";$propname = $_POST['propname'];?><?php$con = mysql_connect($hostname,$username,$password);if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db($dbName, $con);$result = mysql_query("SELECT * FROM $usertable");?><body><?phpecho "<table width='317' border='0' align='center' cellpadding='0'>";while($row = mysql_fetch_array($result)){$test = $row['propname'];$beforepic = $row['beforepic'];$afterpic = $row['afterpic'];echo "<tr> <td height='35' width='310' colspan='2'><p align='left' class='style1'>$test</p> </td> <tr>";echo "<td align='center' class='style2' width='164' height='100'>Before<a href='$beforepic' TARGET='2nd_wind'><img src='$beforepic' height='95%' width='95%' border='0' /></td> <td align='center' class='style2' width='164' height='100'>After <a href='$afterpic' TARGET='2nd_wind'><img src='$afterpic' height='100%' width='95%' border='0' /></td> </tr>";}echo "</table>";?></body>[/code] Link to comment https://forums.phpfreaks.com/topic/31397-php-html-spreading-images/ Share on other sites More sharing options...
esukf Posted December 20, 2006 Share Posted December 20, 2006 Missing </tr> and < /a >. Also looking at your html source, you have 2 <head> and <title> tags.[code]<?phpecho "<table width='317' border='0' align='center' cellpadding='0'>";while($row = mysql_fetch_array($result)){$test = $row['propname'];$beforepic = $row['beforepic'];$afterpic = $row['afterpic'];echo "<tr> <td height='35' width='310' colspan='2'><p align='left' class='style1'>$test</p></td> </tr> <tr> <td align='center' class='style2' width='164' height='100'>Before<a href='$beforepic' TARGET='2nd_wind'><img src='$beforepic' height='95%' width='95%' border='0' alt=''/></td> <td align='center' class='style2' width='164' height='100'>After <a href='$afterpic' TARGET='2nd_wind'><img src='$afterpic' height='100%' width='95%' border='0' alt='' /></a> </td> </tr>";}echo "</table>";[/code] Link to comment https://forums.phpfreaks.com/topic/31397-php-html-spreading-images/#findComment-145349 Share on other sites More sharing options...
esukf Posted December 20, 2006 Share Posted December 20, 2006 oops double post Link to comment https://forums.phpfreaks.com/topic/31397-php-html-spreading-images/#findComment-145351 Share on other sites More sharing options...
esukf Posted December 20, 2006 Share Posted December 20, 2006 I meant 2 <head>.....</head> blocks. Also for xhtml validation target="value", value must start with a letter. Link to comment https://forums.phpfreaks.com/topic/31397-php-html-spreading-images/#findComment-145358 Share on other sites More sharing options...
cjbeck71081 Posted December 20, 2006 Author Share Posted December 20, 2006 Thanks for the quick response, but its still doing it. I copy and pasted the exact code you had and it still did it... any more suggestions? Link to comment https://forums.phpfreaks.com/topic/31397-php-html-spreading-images/#findComment-145375 Share on other sites More sharing options...
esukf Posted December 20, 2006 Share Posted December 20, 2006 Just notice I've also missed another < /a> tag on one of the image links but that should not give the problem you are seeing.I've loaded and refresh the web link you gave many times in both firefox and IE without seeing the problem you've mentioned. Link to comment https://forums.phpfreaks.com/topic/31397-php-html-spreading-images/#findComment-145471 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.