Here are my 2 pages.
echo "Search WorkOrder By Number<br><br>Use % as a WildCard to search the whole DataBase<br><br><form name='form1' method='post' action='search_db.php'>
<label>search
<input type='text' name='s'>
</label>
<label>
<input name='search' type='submit' id='search' value='Search'>
</label>
</form>";
Views fine no problems.
2nd page is to show what it finds.
It should find the ID number of the work order.
<?php
session_start();
include( 'connection.php' );
error_reporting(E_ALL);
ini_set('display_errors', '1');
mysql_connect($dbhost,$dbuser,$dbpass) or die("Unable to connect to database");
@mysql_select_db("$dbname") or die("Unable to select database $dbname");
$ss = trim($_REQUEST['s']);
$query = "SELECT * FROM $table2 WHERE id LIKE '%".$ss."%';";
$result=mysql_query($query);
$resultTable = "<table width='100%' bgcolor='#111111'><tr><td><u>Work Order</u></td></tr>";
if(mysql_numrows($result) == 0 or $ss == ""){
$resultTable = "<table width='100%' bgcolor='#111111'><tr><td>Sorry we came up with nothing.<br/>Please go back and try again.</td></tr>";
}else{
while ($row = mysql_fetch_assoc($result)) {
$resultTable = $resultTable.
"<tr><td align='center'><a href='.././view_workorder=".$row["id"]."'>".$row["id"]."</a></td></tr>";
}
}
$resultTable = $resultTable."</table>";
mysql_close();
?>
When you do % or search for an actual ID number nothing comes up on the page what so ever.
No errors are showing is it something minor?