Link to home
Start Free TrialLog in
Avatar of nnrsc
nnrscFlag for United States of America

asked on

Search results display

I have a dynamiic site which allows user to search my databse. Everything worked well untill today. When there are multilple results pages involved, the first page displays correctly, showing how many records and how many pages, like:
FIRST PREV ( Page 1 of 37, Records 1 to 15 of 545) NEXT LAST

When I click the NEXT button to move onto results page two, nothing comes out. I can see the parameters are being passed on like this:
http://www.otoodle.com/r101.php?Pageno=2&searchterm=wipes&Radius=7000&Destination=95050
But in the results area it says:
FIRST PREV ( Page 1 of 0, Records 16 to 0 of 0) NEXT LAST

If I click the NEXT button again, the it becomes:
http://www.otoodle.com/r101.php?pageno=2&searchterm=&Radius=7000&Destination=95050
So it does not turn to page three, but stay on page two, and the searchterm is no being passed on this time, while the Radius and Destination are.

When I keep clicking the NEXT button all the way to the last page 37, the browser shows:
http://www.otoodle.com/r101.php?pageno=0&&searchterm=&Radius=7000&Destination=95050

However, if I click the LAST button in resuts page one, which displays everything correctly, I get:
http://www.otoodle.com/r101.php?pageno=37&&searchterm=wipes&Radius=7000&Destination=95050
Parematers are passed on, just no records show up in the table for showing records, but:
FIRST PREV ( Page 1 of 0, Records 541 to 0 of 0) NEXT LAST

I haven't made any changes recently. It all worked fine until today. I asked my hosting company any changes on their end. Answer is no. So I am at a loss now. Any ideas or suggestions on how to fix it are greatly appreciated. Below is the code.
<?php
ini_set("memory_limit","256M");
require_once('zipcode.php');      // zip code class
require_once('highlight.php');

include("config.php");
mysql_query("SET character_set_results='utf8'");
$Radius = trim($_REQUEST['Radius']);
$Destination = mysql_real_escape_string($_REQUEST['Destination']);


$second_search=mysql_real_escape_string($_POST['second_search']);
if($second_search){
$search_term = $second_search;
$searchterm = $search_term;
}else{
$search_term = mysql_real_escape_string($_POST['searchterm']);
}

$keywords =explode(" ",$searchterm);
$colors[0]='#00CCFF';
$html_text=$searchterm;

if (isset($_REQUEST['pageno'])) {
   $pageno = $_REQUEST['pageno'];
} else {
   $pageno = 1;
} // if

$zip=mysql_real_escape_string($_REQUEST['Destination']);

if ($zip !='' && is_numeric($zip) ){

$sql5 = "select * from zip_code where $zip=zip_code"; 
$result5 = mysql_query($sql5) or die (mysql_error());  
$query_data = mysql_fetch_row($result5);
$numrows = $query_data[0];
          
if ($numrows ==!1){
echo "<p><font size=\"4px\" face=\"Times New Roman\" color=\"#FF0000\"><b>Please go back and enter a valid 5-digit US Zip Code!</b></font></p>";
exit;
}
}
else {
echo "<p><font size=\"4px\" face=\"Times New Roman\" color=\"#FF0000\"><b>Please go back and enter a valid 5-digit US Zip Code!</b></font></p>";
exit;
}

$z = new zipcode_class;

$zips = $z->get_zips_in_range($Destination, $Radius, _ZIPS_SORT_BY_DISTANCE_ASC, true); 
$zipcodes = array_keys($zips); // this fetches all the zip codes in the $zips variable 
$zip1 = implode("','",$zipcodes);  

$sql5 = "select count(*) from Suppliers, test where Suppliers.Zip in ('.$zip1.') AND MATCH (test.Description,test.Primary_Category,test.Secondary_Category,test.Tertiary_Category,test.Quaternary_Category) AGAINST ('$searchterm') AND test.SID = Suppliers.SID"; 
$result5 = mysql_query($sql5) or die (mysql_error());  
$query_data = mysql_fetch_row($result5);
$numrows = $query_data[0];


$rows_per_page = 15;
$lastpage      = ceil($numrows/$rows_per_page);
$startrow = ($pageno - 1)*$rows_per_page;
$startrow2 = $startrow + 1;
$startrow3 = $startrow + $rows_per_page;
$pageno = (int)$pageno;
if ($pageno > $lastpage) {
   $pageno = $lastpage;
} // if
if ($pageno < 1) {
   $pageno = 1;
} // if
$limit = 'LIMIT ' .($pageno - 1) * $rows_per_page .',' .$rows_per_page;

// Below is an example of how to calculate the distance between two zip codes.

$sql = "select * from Suppliers, test where Suppliers.Zip in ('.$zip1.') AND MATCH (test.Description,test.Primary_Category,test.Secondary_Category,test.Tertiary_Category,test.Quaternary_Category) AGAINST ('$searchterm') AND test.SID = Suppliers.SID $limit"; 
$result = mysql_query($sql) or die (mysql_error());  
$num_rows = mysql_num_rows($result);  

$row = mysql_fetch_assoc($result);
@mysql_data_seek($result,0);
if ($pageno == 1) {
   echo " FIRST PREV ";
} else {
   echo " <a href='{$_SERVER['PHP_SELF']}?pageno=1&searchterm=$searchterm&Radius=$Radius&Destination=$Destination'>FIRST</a> ";
   $prevpage = $pageno-1;
   echo " <a href='{$_SERVER['PHP_SELF']}?pageno=$prevpage&searchterm=$searchterm&Radius=$Radius&Destination=$Destination'>PREV</a> ";
} // if

echo " ( Page $pageno of $lastpage, ";
echo " Records $startrow2 to ";
echo min($startrow3, $numrows);
echo " of $numrows) ";
if ($pageno == $lastpage) {
   echo " NEXT LAST ";
} else {
   $nextpage = $pageno+1;
   echo " <a href='{$_SERVER['PHP_SELF']}?pageno=$nextpage&searchterm=$searchterm&Radius=$Radius&Destination=$Destination'>NEXT</a> ";
   echo " <a href='{$_SERVER['PHP_SELF']}?pageno=$lastpage&&searchterm=$searchterm&Radius=$Radius&Destination=$Destination'>LAST</a> ";
} // if
            
          if($numrows == 0) {  
               echo "Sorry. No records found. Please refine your creteria by including more details. If problem persists, please contact us.";  
          }  
          else {  

echo "<table border='0'>
<tr>
<th></th>
<th></th>
<th></th>
</tr>";

echo "<td align='left'><form name=form2 action='r101.php' method='POST'>
Search&nbsp;<input type='text' name='second_search' id='second_search' value='$searchterm' class='input'>&nbsp;within&nbsp;";
echo "<select name='Radius' id='Radius' class='input'>
        <option value='50'>50</option>
        <option value='100'>100</option>
        <option value='150'>150</option>
        <option value='200'>200</option>
        <option value='250'>250</option>
        <option value='300'>300</option>
        <option value='7000' selected='selected'>any</option>
      </select>"; 
echo "&nbspmiles from Zip Code (5-digit)&nbsp;";
echo "<input name='Destination' type='text' id='Destination' size='10' class='input' />&nbsp;&nbsp";
echo "<input type='submit'  value='Find'>";
echo "</form><td>";

echo "<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>";

echo "<td aligh='right'><form action='r200.php' method='POST'>
<input type='hidden' name='second_search' id='second_search' value='$searchterm'>
<input type='submit' class='style10' value='Visit the Knowledge Center for tips on selecting right $searchterm '>
</form></td></table>";

echo "<table border='1'>
<tr>
<th>Product Photo</th>
<th>Product Information</th>
<th>Supplier Information</th>
<th>Contact Information</th>
</tr>";

 
while($myrow = mysql_fetch_array($result))
  {
  $zipcode = $myrow['Zip'];  
  $miles = $zips[$zipcode]; // return the value for key with the zip code in it. 
   
  echo "<tr>";
  echo "<td><a onclick=\"DescriptionWin(this); return false;\" href=\"" . $myrow["Photo_URL"] . "\"> <img src=\"" . $myrow["Photo_URL"] . "\" border=0 height=150 width=150 alt=\"" . $myrow["Photo_URL"] . "\"></a></td>";
  echo "<td><br /><b>Brief Description: </b>".highlight_search($keywords,'<span>'.$myrow['Description'].'</span>',$colors)."<br />";
  echo "<br /><b>Supplier Product Code: </b>".$myrow['Supplier_Product_Code']."<br />";
  echo "<br />"."<a onclick=\"DescriptionWin(this); return false;\" href=\"" .$myrow['Page_URL']. "\">" . "<b>Click here for more specifications</b>" . "</a>"."<br />"."</td>";
  echo "<td><br /><b>Supplier Name: </b>" . $myrow['Supplier_Name']."<br />";
  echo "<br /><b>Address: </b>".$myrow['Address']."<br />"; 
  echo "<br /><b>Distance: </b>".$miles ." miles"."<br />". "</td>";   
  echo "<td><b><br /> Tollfree: </b>".$myrow['Tollfree']."<br />";
  echo "<br /><b>Local: </b>".$myrow['Phone']."<br />";
  echo "<br /><b>Fax: </b>".$myrow['Fax']."<br />";
  echo "<br /><b>E-mail: </b>"."<a href=mailto:" . $myrow['Email'] . ">" . $myrow['Email']."<br />"."</td>";
  echo "</tr>";  
 }

echo "</table>";
}  

?>

Open in new window

Avatar of nnrsc
nnrsc
Flag of United States of America image

ASKER

Plus, I have this erro log:
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/uploadprogress.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/uploadprogress.so: cannot open shared object file: No such file or directory in Unknown on line 0
Avatar of nnrsc

ASKER

Maybe it is holidays. Haven't seen any replies yet. Here is the error message I get for page two where errors occurs:
Warning: mysql_data_seek() [function.mysql-data-seek]: Offset 0 is invalid for MySQL result index 9 (or the query data is unbuffered) in /home1/.../r101.php on line 82

Line 82 says: @mysql_data_seek($result,0);

I removed the @ to see the error message. Put it back. Still same thing. Results displayed well on page one, from page two and on, no records.

Would anybody take a look at what's wrong?
Can you store the SQL statements you are executing?

Then run them manually via phpMyAdmin (or similar).

See if the query itself is off.

The 2 lines ...

$row = mysql_fetch_assoc($result);
@mysql_data_seek($result,0);


seem completely redundant.

You don't use $row anywhere. So, if you don't fetch the row, you don't need to call mysql_data_seek().

Try commenting out those two lines.



Also, you use mysql_fetch_array() in the while loop to iterate the results. You could use mysql_fetch_assoc().
With regard to the uploadprogressbar.so, the error message is pretty self explanatory.

If this error only started in the last few days, go back to your ISP and ask them if they've moved your account to a different server or did some cleaning up with regard to the /usr directory.

Avatar of nnrsc

ASKER

Thanks for the reply. I commented out the two lines and switched to mysql_fetch_assoc(). Still same situation.

For the uploadprogress.so warning message, I will ask my hosting company again.
Must be a different line number ... and a different error.

Can you add to the top of the script ...

<?php
error_reporting(-1); // Turn on ALL errors/warnings/notices.
ini_set('display_errors', 1); // Actually display all those errors/warnings/notices.
set_time_limit(0); // Allow the script to run forever, rather than the default 30 seconds.
// now your code...
Are you sure there actually is some data for the zip code you supplied?

I can't seem to generate the errors you are.

Avatar of nnrsc

ASKER

I added that part as suggested. I am sure there are data since in the first results page, everything shows up properly, with a count of 545 records in 37 pages. Here is what I did:

Log on to http://www.otoodle.com/
Choose "Cleaning and Sterilization" from the first drop-down box where it says "Select Main Category".
Choose "Wipes" at the very bottom of the second drop-down box where it say " Select sub Category".
Click the Product Search button which directs you to http://www.otoodle.com/r100.php
(Everything works perfect in here. Clicking the NEXT or PREV button takes you to each page with good data.)

Now in http://www.otoodle.com/r100.php, put a zip code 95050 in the box right before the Find button. It takes you to http://www.otoodle.com/r101.php
Things work good so far as well. But when click the NEXT button to move to page two, I get such messages for now:

Notice: Undefined index: second_search in /home1/nnsource/public_html/otoodle/r101.php on line 108

Notice: Undefined index: searchterm in /home1/nnsource/public_html/otoodle/r101.php on line 113

Notice: Undefined variable: searchterm in /home1/nnsource/public_html/otoodle/r101.php on line 116

Notice: Undefined variable: searchterm in /home1/nnsource/public_html/otoodle/r101.php on line 118

Notice: Undefined variable: searchterm in /home1/nnsource/public_html/otoodle/r101.php on line 151

Notice: Undefined variable: searchterm in /home1/nnsource/public_html/otoodle/r101.php on line 173

Warning: mysql_data_seek() [function.mysql-data-seek]: Offset 0 is invalid for MySQL result index 9 (or the query data is unbuffered) in /home1/nnsource/public_html/otoodle/r101.php on line 178
FIRST PREV ( Page 1 of 0, Records 16 to 0 of 0)
Notice: Undefined variable: searchterm in /home1/nnsource/public_html/otoodle/r101.php on line 195
NEXT
Notice: Undefined variable: searchterm in /home1/nnsource/public_html/otoodle/r101.php on line 196
LAST Sorry. No records found. Please refine your creteria by including more details. If problem persists, please contact us.

To make the lines consistent, I attached all the code below, including the HTML part which I took away before to save some lines.
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SourceBook, Your Assistant in Sourcing for Industrial Materials and Equipment</title>

<script>
function DescriptionWin(url){
	w = document.body.clientWidth;
	h = document.body.clientHeight;
 
	var popW = 600, popH = 400;
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	var myPopup = window.open(url,"Description","height=" + popH + ",width=" + popW + ",top=" + topPos + ",left=" +leftPos + ",scrollbars=yes,resizable=no,toolbar=no,directory=no")
	myPopup.focus();
}
</script>

<style type="text/css">
<!--
.style20 {font-family: "book Antiqua";
	font-size: 36pt;
	color: #0033FF;
}
.style11 {
	font-family: "Bookman Old Style";
	font-weight: bold;
	font-size: 24pt;
}
.style23 {
	font-family: "Bookman Old Style";
	font-style: normal;
	font-size: 24px;
}
.style10 {font-family: "Times New Roman", Times, serif;
	font-size: 12pt;
}

.input {
    border: 1px solid #006;
    background: #ffc;
	background-color:#66FFFF;
}
.input:hover {
    border: 1px solid;
    background: url('/forms/down.png') no-repeat top left;
    padding: 2px 8px;

}
.button {
    border: 1px solid;
	border:#CCCCCC
    background: url('/forms/up.png') no-repeat top left;
    padding: 2px 8px;
	text-align:left;
	width: 500px;
}
.button:hover {
    border: 1px solid;
    background: url('/forms/down.png') no-repeat top left;
    padding: 2px 8px;
}
label {
    display: block;
    width: 150px;
    float: left;
    margin: 2px 4px 6px 4px;
    text-align: right;
}
br { clear: left; }

-->
</style>
<meta name="Keywords" content="Online sourcing tool that helps procurement and sourcing professional locate manufacturers and distributors of industrial materials and equipment within a radius of your destination, with detailed product descriptions and supplier contact info available together just by one click." />
<meta name="Description" content="Online sourcing tool that helps procurement and sourcing professional locate manufacturers and distributors of industrial materials and equipment within a radius of your destination, with detailed product descriptions and supplier contact info available together just by one click." />
<meta name="robots" content="Online sourcing tool that helps procurement and sourcing professional locate manufacturers and distributors of industrial materials and equipment within a radius of your destination, with detailed product descriptions and supplier contact info available together just by one click." />
</head>

<body>

  <div align="left">
    <p><span class="style20"><span class="style11">SourceBook</span></span> <span class="style23"><sup>&#8482</sup></span></p>
</div>
<label></label>
  <label></label>
  <div align="left"></div>
  <p align="right"><span class="style9"><a href="http://www.otoodle.com/">Home</a> | <a href="Company.html">Company</a> | <a href="Clients.html">Clients</a> |<a href="Investment_Opportunity.html"> Investors</a> <span class="style10">| <a href="rss.php">SourceBuzz</a></span> | <a href="Contact.html">Contact</a></span></p>
<p>&nbsp;</p>
</body>
</html>

<?php
error_reporting(-1); // Turn on ALL errors/warnings/notices.
ini_set('display_errors', 1); // Actually display all those errors/warnings/notices.
set_time_limit(0); // Allow the script to run forever, rather than the default 30 seconds.


ini_set("memory_limit","256M");
require_once('zipcode.php');      // zip code class
require_once('highlight.php');

include("config.php");
mysql_query("SET character_set_results='utf8'");
$Radius = trim($_REQUEST['Radius']);
$Destination = mysql_real_escape_string($_REQUEST['Destination']);


$second_search=mysql_real_escape_string($_POST['second_search']);
if($second_search){
$search_term = $second_search;
$searchterm = $search_term;
}else{
$search_term = mysql_real_escape_string($_POST['searchterm']);
}

$keywords =explode(" ",$searchterm);
$colors[0]='#00CCFF';
$html_text=$searchterm;

if (isset($_REQUEST['pageno'])) {
   $pageno = $_REQUEST['pageno'];
} else {
   $pageno = 1;
} // if

$zip=mysql_real_escape_string($_REQUEST['Destination']);

if ($zip !='' && is_numeric($zip) ){

$sql5 = "select * from zip_code where $zip=zip_code"; 
$result5 = mysql_query($sql5) or die (mysql_error());  
$query_data = mysql_fetch_row($result5);
$numrows = $query_data[0];
          
if ($numrows ==!1){
echo "<p><font size=\"4px\" face=\"Times New Roman\" color=\"#FF0000\"><b>Please go back and enter a valid 5-digit US Zip Code!</b></font></p>";
exit;
}
}
else {
echo "<p><font size=\"4px\" face=\"Times New Roman\" color=\"#FF0000\"><b>Please go back and enter a valid 5-digit US Zip Code!</b></font></p>";
exit;
}

$z = new zipcode_class;

$zips = $z->get_zips_in_range($Destination, $Radius, _ZIPS_SORT_BY_DISTANCE_ASC, true); 
$zipcodes = array_keys($zips); // this fetches all the zip codes in the $zips variable 
$zip1 = implode("','",$zipcodes);  

$sql5 = "select count(*) from Suppliers, test where Suppliers.Zip in ('.$zip1.') AND MATCH (test.Description,test.Primary_Category,test.Secondary_Category,test.Tertiary_Category,test.Quaternary_Category) AGAINST ('$searchterm') AND test.SID = Suppliers.SID"; 
$result5 = mysql_query($sql5) or die (mysql_error());  
$query_data = mysql_fetch_row($result5);
$numrows = $query_data[0];


$rows_per_page = 15;
$lastpage      = ceil($numrows/$rows_per_page);
$startrow = ($pageno - 1)*$rows_per_page;
$startrow2 = $startrow + 1;
$startrow3 = $startrow + $rows_per_page;
$pageno = (int)$pageno;
if ($pageno > $lastpage) {
   $pageno = $lastpage;
} // if
if ($pageno < 1) {
   $pageno = 1;
} // if
$limit = 'LIMIT ' .($pageno - 1) * $rows_per_page .',' .$rows_per_page;

// Below is an example of how to calculate the distance between two zip codes.

$sql = "select * from Suppliers, test where Suppliers.Zip in ('.$zip1.') AND MATCH (test.Description,test.Primary_Category,test.Secondary_Category,test.Tertiary_Category,test.Quaternary_Category) AGAINST ('$searchterm') AND test.SID = Suppliers.SID $limit"; 
$result = mysql_query($sql) or die (mysql_error());  
$num_rows = mysql_num_rows($result);  

$row = mysql_fetch_assoc($result);
mysql_data_seek($result,0);
if ($pageno == 1) {
   echo " FIRST PREV ";
} else {
   echo " <a href='{$_SERVER['PHP_SELF']}?pageno=1&searchterm=$searchterm&Radius=$Radius&Destination=$Destination'>FIRST</a> ";
   $prevpage = $pageno-1;
   echo " <a href='{$_SERVER['PHP_SELF']}?pageno=$prevpage&searchterm=$searchterm&Radius=$Radius&Destination=$Destination'>PREV</a> ";
} // if

echo " ( Page $pageno of $lastpage, ";
echo " Records $startrow2 to ";
echo min($startrow3, $numrows);
echo " of $numrows) ";
if ($pageno == $lastpage) {
   echo " NEXT LAST ";
} else {
   $nextpage = $pageno+1;
   echo " <a href='{$_SERVER['PHP_SELF']}?pageno=$nextpage&searchterm=$searchterm&Radius=$Radius&Destination=$Destination'>NEXT</a> ";
   echo " <a href='{$_SERVER['PHP_SELF']}?pageno=$lastpage&&searchterm=$searchterm&Radius=$Radius&Destination=$Destination'>LAST</a> ";
} // if
            
          if($numrows == 0) {  
               echo "Sorry. No records found. Please refine your creteria by including more details. If problem persists, please contact us.";  
          }  
          else {  

echo "<table border='0'>
<tr>
<th></th>
<th></th>
<th></th>
</tr>";

echo "<td align='left'><form name=form2 action='r101.php' method='POST'>
Search&nbsp;<input type='text' name='second_search' id='second_search' value='$searchterm' class='input'>&nbsp;within&nbsp;";
echo "<select name='Radius' id='Radius' class='input'>
        <option value='50'>50</option>
        <option value='100'>100</option>
        <option value='150'>150</option>
        <option value='200'>200</option>
        <option value='250'>250</option>
        <option value='300'>300</option>
        <option value='7000' selected='selected'>any</option>
      </select>"; 
echo "&nbspmiles from Zip Code (5-digit)&nbsp;";
echo "<input name='Destination' type='text' id='Destination' size='10' class='input' />&nbsp;&nbsp";
echo "<input type='submit'  value='Find'>";
echo "</form><td>";

echo "<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>";

echo "<td aligh='right'><form action='r200.php' method='POST'>
<input type='hidden' name='second_search' id='second_search' value='$searchterm'>
<input type='submit' class='style10' value='Visit the Knowledge Center for tips on selecting right $searchterm '>
</form></td></table>";

echo "<table border='1'>
<tr>
<th>Product Photo</th>
<th>Product Information</th>
<th>Supplier Information</th>
<th>Contact Information</th>
</tr>";

 
while($myrow = mysql_fetch_array($result))
  {
  $zipcode = $myrow['Zip'];  
  $miles = $zips[$zipcode]; // return the value for key with the zip code in it. 
   
  echo "<tr>";
  echo "<td><a onclick=\"DescriptionWin(this); return false;\" href=\"" . $myrow["Photo_URL"] . "\"> <img src=\"" . $myrow["Photo_URL"] . "\" border=0 height=150 width=150 alt=\"" . $myrow["Photo_URL"] . "\"></a></td>";
  echo "<td><br /><b>Brief Description: </b>".highlight_search($keywords,'<span>'.$myrow['Description'].'</span>',$colors)."<br />";
  echo "<br /><b>Supplier Product Code: </b>".$myrow['Supplier_Product_Code']."<br />";
  echo "<br />"."<a onclick=\"DescriptionWin(this); return false;\" href=\"" .$myrow['Page_URL']. "\">" . "<b>Click here for more specifications</b>" . "</a>"."<br />"."</td>";
  echo "<td><br /><b>Supplier Name: </b>" . $myrow['Supplier_Name']."<br />";
  echo "<br /><b>Address: </b>".$myrow['Address']."<br />"; 
  echo "<br /><b>Distance: </b>".$miles ." miles"."<br />". "</td>";   
  echo "<td><b><br /> Tollfree: </b>".$myrow['Tollfree']."<br />";
  echo "<br /><b>Local: </b>".$myrow['Phone']."<br />";
  echo "<br /><b>Fax: </b>".$myrow['Fax']."<br />";
  echo "<br /><b>E-mail: </b>"."<a href=mailto:" . $myrow['Email'] . ">" . $myrow['Email']."<br />"."</td>";
  echo "</tr>";  
 }

echo "</table>";
}  

?>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Richard Quadling
Richard Quadling
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nnrsc

ASKER

Thanks for the suggestions. You did point me to the right direction. I doubled checked my files and found my form was not setup properly, so nothing passed on. It's all fixed not and the site works well now.
Glad to have helped.