I am trying to query my database and use the variables as parameters.
<?php
echo "<input type='hidden' id='address' name='address'>";
echo "<input type='hidden' id='city' name='city'>";
echo "<input type='hidden' id='state' name='state'>";
$sql = "SELECT * FROM Work WHERE SCAddress = '$address' AND SCCity = '$city' AND SCState = '$state' LIMIT 2";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_assoc ($result)) {
echo "<br>";
echo $row['AssignedTo'];
echo "<br>";
echo $row['WorkCompleted'];
echo "</p>";
}
} else {
echo "There is no work history";
}
?>
How do I get the values of the hidden inputs to be used as the AND parameters?