I am trying to create a basic search function. I have a text field with an id of "npa" when I submit I would like the values placed in the npa field to be inserted in to the $searchroute mysql query.
I am VERY new to php so this has got me slightly stumped.
if ($_POST["submit"]) {
$searchroute = "SELECT * FROM destination_route as d WHERE d.destPrefix='npa'";
$results = mysql_query($searchroute);
$row = mysql_fetch_array($results);
print_r($row);
}
?>
<html>
<form name="query" id="showdid" action="" method="post" enctype="multipart/form-data" >
<input type="text" name="npa" id="npa" value="">
<input type="submit" name="submit" id="submit" value="Submit">
</form>
</html>