I still have not resolved this...I've tried several ways of applying the code for the "if" statement and I always am getting errors can you tell me if it is do to my select statement?
<?php
$db = mysql_connect("127.0.0.1", "client", "");
mysql_select_db("Military_Catalog",$db);
$str1="$start";
$str2="$second";
$str3="$third";
$str4="$fourth";
//$finalstr=$str1 . "-" . $str2 . "-" . $str3 . "-" . $str4;
//$sql_events = mysql_query("SELECT `partnum` , `nsn` , `description` , `top_level_kit` , `eng_used_on` FROM `partslist` WHERE 1 AND `nsn` LIKE '$finalstr' LIMIT 0 , 30 ") or die (mysql_error());
$sql_events = mysql_query("SELECT `partnum` , `nsn` , `description` , `top_level_kit` , `eng_used_on` FROM `partslist` WHERE `nsn` REGEXP '.*$str1.*-.*$str2.*-.*$str3.*-.*$str4.*' ") or die (mysql_error());
while ($row = mysql_fetch_array($sql_events)) {
$partnum = $row["partnum"];
$nsn = $row["nsn"];
$top_level_kit = $row["top_level_kit"];
$description = $row["description"];
$eng_used_on = $row["eng_used_on"];
echo"
<p>
Part Number: $partnum<br />
NSN: $nsn<br />
Top Level Kit: $top_level_kit<br />
Description: $description<br />
Engine Used On: $eng_used_on
</p>
<hr noshade>
";
if(mysql_num_rows($result)==0)
echo"<p>no results</p>";
}
?>