Mysql info


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>


   /* call this script "advs.php" */
   if(!$c) { 
<form action="advs.php?c=1" method=POST>
<b>Find Results with: </b><br>
Any of these words: <input type="text" length=40 name="any"> <br>
All of these words: <input type="text" length=40 name="all"> <br>
None of these words: <input type="text" length=40 name="none"> <br>
<input type="submit" value="Search">
   } else if($c) {
   MySQL_connect("localhost", "uuser", "passwd");
   if((!$all) || ($all == "")) { $all = ""; } else { $all = "+(".$all.")"; }
   if((!$any) || ($any == "")) { $any = ""; } 
   if((!$none) || ($none == "")) { $none = ""; } else { $none = "-(".$none.")"; }
   $query = "
       SELECT *,
          MATCH(Title) AGAINST ('$all $none $any' IN BOOLEAN MODE) AS score 
          FROM list 
       WHERE MATCH(Title) AGAINST ('$all $none $any' IN BOOLEAN MODE)";
      $artm1 = MySQL_query($query);
      if(!$artm1) { 
         echo MySQL_error()."<br>$query<br>"; 
      echo "<b>Article Matches</b><br>";
      if(MySQL_num_rows($artm1) > 0) {
         echo "<table>";
          echo "<tr><td>Title </td></tr>";
             while($artm2 = MySQL_fetch_array($artm1)) {
            echo "<tr>";
            echo "<td>{$artm2['title']}</td>";
            echo "</tr>";
      echo "</table>";
   else { 
      echo "No Results were found in this category.<br>"; 
   echo "<br>"; 

what is wrong with the script? I see script in the firfox browser after I work on it in dreamweaver. I can't figure it out.

Member Avatar for iamthwee

I don't get wat you mean. Can u explain it a bit more thoroughly. :sad:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.