ok this is going to be for a search....
i know that you somehow use the wildcard % and s?
something liek this maybe id%s ??
I'm not 100% sure on this.
but my search works and it does what it should but I need it now to link to the result.php page and use the result.php=$variable and have it display the info in a table
here's my results page as is....
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?
include("db.php");
$query = "SELECT * FROM $make WHERE Mod_Name=$Mod_Name";
$result = mysql_query($query, $mysql_access);
while ($row = mysql_fetch_array($result))
{
echo "<table width=\"675\" height=\"600\" border=\"1\" bordercolor=\"black\" borderstyle=\"solid\" align=center>";
echo "<tr><td class=show>Year</td><td class=howto> ".$row["1"];
echo "</td></tr><tr><td class=show>Model</td><td class=howto height=25> ".$row["2"];
echo "</td></tr><tr><td class=show>Type of How To</td><td class=howto height=25> ".$row["3"];
echo "</td></tr><tr><td class=show>Mod Name</td><td class=howto height=25> ".$row["4"];
echo "</td></tr><tr><td class=show>Estimated Time to complete mod</td><td class=howto height=25> ".$row["5"];
echo "</td></tr><tr><td class=show>Description</td><td class=howto height=25> ".$row["6"];
echo "</td></tr><tr><td class=show>Esitimated Price</td><td class=howto height=25> ".$row["7"];
echo "</td></tr><tr><td class=show>Steps and Procedure<td class=steps> ".$row["8"];
echo "</td></tr><tr><td class=show>Created by<td class=howto height=25> ".$row["9"];
}
echo "</td></tr></table>";
?>
</body>
</html>
and the search goes like this....
<html>
<head>
<title>TunerCarz-- Search How To Db</title>
<link rel="stylesheet" type="text/css" href="howtostyle.css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#999999">
<div width="800">
<table width="800" align="center" valign="top">
<tr><td class=howto><img src="mainlogo.jpg" width="800" height="150"></td></tr>
<td width="20%" align="left">
<table width="125" align="left"><tr>
<td class="topcell" align="right">Navigate</td></tr>
<tr><td class="howto"><a href="http://tunercarz.com">Home</a></td></tr>
<tr><td class="howto"><a href="help.php">Help On How To</a></td></tr>
<tr><td class="howto"><a href="inserthowto.php">Add How To</a></td></tr>
<tr><td class="howto"><a href="search.php">Search</a></td></tr>
<tr><td class="howto">Update a How to</td></tr>
<tr><td class="howto"><a href="show.php">Sample How To</a></td></tr>
<tr><td class="howto"><a href="imagehowto.php">Image Upload</a></td></tr>
</table>
<?
include("db.php");
if ($searchstring)
{
$query = "SELECT * FROM $make WHERE $searchtype LIKE '%$searchstring%' ORDER BY Mod_Name ASC";
$result = mysql_query($query, $mysql_access);
while ($row = mysql_fetch_array($result))
{
echo "<table width=\"675\" height=\"600\" border=\"1\" bordercolor=\"black\" borderstyle=\"solid\" align=center>";
echo "<tr><td class=show>Year</td><td class=howto> ".$row["1"];
echo "</td></tr><tr><td class=show>Model</td><td class=howto height=25> ".$row["2"];
echo "</td></tr><tr><td class=show>Type of How To</td><td class=howto height=25> ".$row["3"];
echo "</td></tr><tr><td class=show>Mod Name</td><td class=howto height=25> ".$row["4"];
echo "</td></tr><tr><td class=show>Estimated Time to complete mod</td><td class=howto height=25> ".$row["5"];
echo "</td></tr><tr><td class=show>Description</td><td class=howto height=25> ".$row["6"];
echo "</td></tr><tr><td class=show>Esitimated Price</td><td class=howto height=25> ".$row["7"];
echo "</td></tr><tr><td class=show>Steps and Procedure<td class=steps> ".$row["8"];
echo "</td></tr><tr><td class=show>Created by<td class=howto height=25> ".$row["9"];
}
echo "</td></tr></table>";
}
else
{
?>
<table width="675" border="1" bordercolor="black" borderstyle="solid" align=center>
<form method=post action=search.php>
<tr><td class=topcell></td><td class=topcell>Search Mercury How To Database</td></tr>
<tr>
<td width="37%" class="howto"> Make:</td>
<td width="63%" align="center" class=howto>
<select name="make">
<option selected value="All_Cars">All Cars</option>
<option value="Acura">Acura</option>
<!--cut out alot of readability-->
<option value="Yugo">Yugo</option>
</select></td></tr>
<tr><td class=howto>Search Type:</td><td class=howto><select name=searchtype>
<option selected value=Year>Year</option>
<option value=Model>Model</option>
<option value=Type_of_How_To>Type of How To</option>
<option value=Mod_Name>Mod_Name</option>
<option value=Created_by>Created by</option>
</select></td></tr>
<tr><td class=howto>Search Criteria:</td><td class=howto><input type=text name=searchstring size=28></td>
<tr><td class=howto></td><td class=howto><input type=submit value=Search>
<input type=reset value=Reset></td></tr></form></table>
</table></div>
<?
}
printf ("<table width=\"800\" align=\"center\" class=\"howto\">");
printf ("<tr><td class=\"footer\">This script was made by <a href=\"mailto:mike@tunercarz.com\">Mike Filtenborg</a><br>
Site is copyright of TunerCarz 2003</td></tr>");
printf ("</table>");
?>
</body>
</html>
thanks all 🙂