I have the below section of code where I want to display how many orders have been added if conditions of the $orderstat are met. The alert works but not with the $orderstat variable inside it. Can anyone see what I am doing wrong? Thanks in advance!
session_start();
$orderstat = $_SESSION['orderstat'];
if ( $orderstat == "1" || $orderstat == "2" || $orderstat == "3" || $orderstat == "4") {
echo '<script language="javascript">';
**echo 'alert('<?php echo $orderstat; ?>' + "order/s successfully added to Job")';**
echo '</script>';
}
session_destroy();