graham23s Posted September 14, 2008 Share Posted September 14, 2008 Hi Guys, what i'm trying to do here is check the database for a Y if the order has a Y beside it (denoting a P medecine) you get sent to the cart.php page to fill in some questions: code: <?php // do a check to see if any of the products are [P] $q_p = "SELECT `p_med` FROM `fcp_orders` WHERE `customer_id`='$session_id '"; $r_p = mysql_query($q_p); $a_p = mysql_fetch_array($r_p); // P $P = $a_p['p_med']; // check if ($P == 'Y') { // back to cart header("Location: cart.php"); } ?> i need to loop through the table i guess to see if the $P i s set to Y but not sure the best way! thanks for any help guys Graham Link to comment https://forums.phpfreaks.com/topic/124223-checking-an-enum/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.