View Single Post
Old 06-26-2005, 09:07 PM   #2 (permalink)
xacto
Junior Member
 
Join Date: Jun 2005
Posts: 13
Default

Hi - Nice Forum WMF

`kayla` I think this might point you in the right direction.

PHP Code:
<html> 
<head> 
  <title>Results</title> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> 
<body> 
<h1>Search Results</h1> 
<?php 
$database
="database_name"
mysql_connect ("localhost""username""password"); 
@
mysql_select_db($database) or die( "Unable to select database"); 
$query "select * from tablename"
$result mysql_query($query); 

  
$num_results mysql_num_rows($result); 

  echo 
"<p>Number matches found: ".$num_results."</p>"
  echo 
"<hr>"

  for (
$i=0$i <$num_results$i++) 
  { 
      
     
$row mysql_fetch_array($result); 
     echo 
"<p><strong># "
     echo 
stripslashes($row["contact_id"]); 
  echo 
"<p><strong>Name: "
     echo 
stripslashes($row["first_name"]); 
  echo 
"<p><strong>Category: "
     echo 
stripslashes($row["lastname"]); 
     echo 
"<p><strong>Comment: "
     echo 
stripslashes($row["comments"]); 
      echo 
"<hr>"
     echo 
"</p>"
  } 

?> 
</body> 
</html>


cheers
xacto is offline   Reply With Quote
Sponsored Links