Currently i have a query that searched on 'availability' using the following code;
$status = 'available';
$stmt = $pdo->query('SELECT * FROM orders WHERE idorder = "' . $status . '"');
$results = $stmt->fetchAll();
My question is; How can i change the variable from $status from 'available' to whatever is entered into the search box?