Is it possible for you to post a link for it, so that I do not have to try and make it work as it stands at the moment?
I am more an HTML wiz than a PHP guru, and I think I may have had a similar problem in the past that I solved, so I will try to help Keiran -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 9:12 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] PHP and HTML problems The file did not attach to the problem I asked for earlier. Here is what I need below: HI People, I do not use dreamweaver normally, but have to do a few changes and add some php code to this site. I wonder if someone could quickly look at the attached php page, and look at the navigation i use and see why it is looping within the html. Basically I need the records to look but not the next and previous section for the navigation. If someone could let me know where I am going wrong, as its urgent. It is the html formatting that I think I cannot quite get to grips with. Thanks Barry Here is the file below *********************************** <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>In Press Technical Marketing: Client List</title> <style type= "text/css"> p { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt} li { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt} td { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt} </style> <script language="JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); // --> </script> </head> <body bgcolor="#FFFFFF" text="#000000"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"> <tr> <td valign="middle" align="center"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td width="1" height="2" valign="top"></td> <td width="163" height="2" valign="top"></td> <td width="21" height="2" valign="top"></td> <td width="339" height="2" valign="top"></td> <td width="11" height="2" valign="top"></td> <td width="167" height="2" valign="top"></td> </tr> <tr> <td height="57" colspan="6" valign="top"> <div align="center"><img src="imagespr/IP%20TM.gif" width="90" height="39"></div> </td> </tr> <tr> <td height="30" colspan="6" valign="top"><img src="imagespr/buttons.jpg" width="700" height="30" usemap="#Map2" border="0" href="port.html"></td> </tr> <tr> <td height="235" colspan="2" rowspan="2" valign="top" background="imagespr/left.gif"> <p> <p> </p> <p> </p> </td> <td width="21" height="11" valign="top"></td> <td width="339" height="11" valign="top"></td> <td width="11" height="11" valign="top"></td> <td width="167" height="239" rowspan="2" valign="top"><img src="imagespr/right1.jpg" width="164" height="244"></td> </tr> <tr> <td width="21" height="230" valign="top"></td> <td width="339" height="230" valign="top"> <table width="100%" height="32"> <tr> <td height="36" colspan="3">Here are the results of your search: [ <a href="client.php">back to search</a> ]</td> </tr> <? //BZDP PHP Connect Code: $user = "****"; $pass = "***/*"; $db = "****"; $link = mysql_pconnect( "localhost", $user, $pass ); if ( ! $link) die( "Couldn't connect to MySQL" ); mysql_select_db( $db, $link ) or die ("Couldn't open $db: ".mysql_error() ); echo ("<input type=hidden name=clientname value=$clientname>\n"); echo ("<input type=hidden name=industry_area value=$industry_area>\n"); echo ("<input type=hidden name=release_number value=$number>\n"); $count = 1; $numcols = 3; $limit = 2; if ($industry_area != "") : $sqlcount= "SELECT * FROM clients WHERE ('$industry_area' = industry_area) ORDER BY clientname DESC"; elseif ($clientname != "") : $sqlcount= "SELECT * FROM clients WHERE ('$clientname' = clientname) ORDER BY clientname DESC"; elseif ($number != "") : $sqlcount= "SELECT * FROM press_release WHERE ('$number' = number) ORDER BY clientname DESC"; endif; $sql_countresult = mysql_query($sqlcount); $totalrows = mysql_num_rows($sql_countresult); if(empty($page)){ $page = 1; } $limitvalue1 = $page*$limit-($limit); if ($industry_area != "") : $sql= "SELECT * FROM clients WHERE ('$industry_area' = industry_area) ORDER BY clientname DESC LIMIT $limitvalue1, $limit"; elseif ($clientname != "") : $sql= "SELECT * FROM clients WHERE ('$clientname' = clientname) ORDER BY clientname DESC LIMIT $limitvalue1, $limit"; elseif ($number != "") : $sql= "SELECT * FROM press_release WHERE ('$number' = number) ORDER BY clientname DESC LIMIT $limitvalue1, $limit"; endif; $sql_result = mysql_query($sql); if (mysql_num_rows($sql_result) ==0) { echo ("Sorry No results found</p>\n"); } else { while ($row = mysql_fetch_array($sql_result)){ echo (" <tr> \n"); echo (" <td height=\"15\" width=\"29%\"> \n"); echo (" <p><b>Name</b></p>\n"); echo (" </td>\n"); echo (" <td height=\"15\" colspan=\"2\">$row[clientname]</td>\n"); echo (" </tr>\n"); echo (" <tr> \n"); echo (" <td height=\"15\" width=\"29%\"><b>Yrs With Inpress</b></td>\n"); echo (" <td height=\"15\" colspan=\"2\">$row[years_at_inpress]</td>\n"); echo (" </tr>\n"); echo (" <tr> \n"); echo (" <td height=\"15\" width=\"29%\"><b>Press Releases</b></td>\n"); echo (" <td height=\"15\" colspan=\"2\"><a href=\"clientsprlist.php?clientname=$row[clientname]\">View Press Realeases</a></td>\n"); echo (" </tr>\n"); echo (" <tr> \n"); echo (" <td height=\"15\" width=\"29%\"><b>Case Studies</b></td>\n"); echo (" <td height=\"15\" colspan=\"2\"><a href=\"clientscaselist.php?clientname=$row[clientname]\">View Case Studies</a></td>\n"); echo (" </tr>\n"); ?> </table> <table width="100%" border="0"> <tr> <td> <? if($page != 1) { $pageprev= $page - 1; echo "<font color=#000000 face=\"verdana\" Size=1><A HREF=\"$PHP_SELF?page=$pageprev&clientname=$clientname&industry_area=$industry_area&release_number=$number\"> PREV </A></FONT>"; // if page is not equal to one, prev goes to $page - 1 } else { } $numofpages = $totalrows/$limit; for($i= 1; $i < $numofpages; $i++) { if($page == $i) { echo "<font color=#000000 face=\"verdana\" Size=1> $i </font>"; //make number navigation } else{ echo "<font color=#000000 face=\"verdana\" Size=1><A HREF=\"$PHP_SELF?page=$i&clientname=$clientname&industry_area=$industry_area&release_number=$number\"> $i </A></font>"; //make number navigation } } if($totalrows%$limit != 0) { if($page > $numofpages) { echo "<font color=#000000 face=\"verdana\" Size=1> $i </font>"; //make number navigation } else{ echo "<font color=#000000 face=\"verdana\" Size=1><A HREF=\"$PHP_SELF?page=$i&clientname=$clientname&industry_area=$industry_area&release_number=$number\"> $i </A></font>"; ////if there is a remainder, add another page } } if(($totalrows-($limit*$page)) > 0){ $pagenext = $page + 1; echo "<font color=#000000 face=\"verdana\" Size=1><A HREF=\"$PHP_SELF?page=$pagenext&clientname=$clientname&industry_area=$industry_area&release_number=$number\">NEXT </A></FONT>"; // if the totalrows - $limit * $page is > 0 (meaning there is a remainder), leave the next button. } } } mysql_free_result($sql_result); ?> </td> </tr> </table> </td> <td width="11" height="230" valign="top"></td> </tr> <tr> <td height="76" colspan="6" valign="top"><img src="imageshome/bottom.jpg" width="700" height="69"></td> </tr> <tr> <td width="1" height="1" valign="top"><img width="1" height="1" src="transparent.gif"></td> <td width="163" height="1" valign="top"><img width="163" height="1" src="transparent.gif"></td> <td height="1" colspan="3" valign="top"><img width="370" height="1" src="transparent.gif"></td> <td width="167" height="1" valign="top"><img width="167" height="1" src="transparent.gif"></td> </tr> <tr> <td width="1" height="1" valign="top"><img width="1" height="1" src="transparent.gif"></td> <td width="163" height="1" valign="top"><img width="162" height="1" src="transparent.gif"></td> <td width="21" height="1" valign="top"><img width="21" height="1" src="transparent.gif"></td> <td width="339" height="1" valign="top"><img width="339" height="1" src="transparent.gif"></td> <td width="11" height="1" valign="top"><img width="11" height="1" src="transparent.gif"></td> <td width="167" height="1" valign="top"><img width="167" height="1" src="transparent.gif"></td> </tr> </table> <map name="Map"> <area shape="poly" coords="185,9" href="#"> <area shape="rect" coords="238,2,298,28" href="int.html"> <area shape="rect" coords="303,2,401,29" href="pr.html"> <area shape="rect" coords="406,2,465,30" href="portfolio/PRport.html"> <area shape="poly" coords="187,3,170,27,233,27,233,3" href="design.html"> </map> </td> </tr> </table> <map name="Map2"> <area shape="rect" coords="115,3,163,30" href="index.html"> <area shape="rect" coords="533,3,590,29" href="enq.html"> <area shape="rect" coords="183,3,234,28" href="design.html"> <area shape="rect" coords="239,2,298,28" href="int.html"> <area shape="rect" coords="303,2,401,32" href="pr.html"> <area shape="rect" coords="405,2,466,30" href="port.html"> <area shape="rect" coords="469,2,520,32" href="client.php"> </map> </body> </html> ************************************************** -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php