Hi I need help about echoing message from another function, below is my script, in my database is already set the product_quantity is 0, but not able show the alert message, its that anything wrong in the code?
function get_products_in_cat_page(){
$query = query(" SELECT * FROM products WHERE product_category_id = " . escape_string($_GET['id']) . " ");
confirm($query);
if(mysqli_num_rows($query) == 0) { set_message("Will update soon the new products");
} else {
while($row = fetch_array($query)) {
$product_image = display_image($row['product_s_image']);
$outofstock = out_of_stock(); //--this is alert message I echoing from another function like below --//
$product = <<