I am having a problem getting my query to fetch all the results needed from my DB.
I have a search on my home page, which directs the user to the page i am discussing. The user uses their postal code to search for restaurants in their area.
My query checks the db for results that match what has been inputted into the search bar, my problem is it only shows 1 result even if their are more than one. It always shows the last restaurant inputted into the DB.
I cannot seem to see what the problem is, any help or suggesting would be much appreciated.
WHERE Delivery_Pcode.Pcode LIKE '%".$searchq."'") or die ("could not search!");
$count = mysqli_num_rows($sql);
$output ='<b>Oh no! We do not currently deliver to '.$searchq.'</b></br>
Please leave your email address & we will notify you as soon as we do! </br>
<input type="text" name="FirstName" value="">
<input type="submit" value="Submit">
$EXAMPLE = $row_prods['EXAMPLE'];
$output ='<h3 id="rest_name">'.$rest_name .'</h3>'.
Same as Bender suggested but you can not use (+) sign for concatenation, use (.) instead.
$output = $output . '<h3 id="rest_name">'.$rest_name .'</h3>'. '<p class="title"> Price</p>'. '<p class="title">Avg Delivery</p>'. '<p class="title">Cost</p>'. '<a href="product_page.php?rest_id='.$rest_id.'&Postcode='.$searchq.'"><button id="feed">Feed Me!</button></a>'. ;