NOW() ;"; $result = mysqli_query($GLOBALS['conn'],$query) ; $row = mysqli_fetch_array($result); //echo $row; if ($row['percentdiscount'] > 0) { //echo "hello"; $_SESSION['promodiscount']=$row['percentdiscount']; $_SESSION['promocourses']=$row['courses']; $startdate=$row['startDate']; $enddate=$row['endDate']; $coursearray=explode(' ',$_SESSION['promocourses']); $resultstuff=$resultstuff."