tamani Posted June 27, 2012 Share Posted June 27, 2012 Notice: Use of undefined constant PARTIAL - assumed 'PARTIAL' in C:\wamp\www\book-o-rama\order_fns.php on line 56 Hi, Please help. I have been trying to follow the Book-O-Rama example in PHP & MySQL Web Development book and its giving me the above error massage when i click the purchase button after filling in the customer details chuck of code: $query = "insert into orders values ('', '".$customerid."', '".$_SESSION['total_price']."', '".$date."', '".PARTIAL."', '".$ship_name."', '".$ship_address."', '".$ship_city."', '".$ship_state."', '".$ship_zip."', '".$ship_country."')"; Quote Link to comment https://forums.phpfreaks.com/topic/264870-use-of-undefined-constant-partial-assumed-partial-in-cwampwww/ Share on other sites More sharing options...
PeoMachine Posted June 27, 2012 Share Posted June 27, 2012 You should have a declaration of the const PARTIAL, something like: <?php define ('PARTIAL', 'some value'); Quote Link to comment https://forums.phpfreaks.com/topic/264870-use-of-undefined-constant-partial-assumed-partial-in-cwampwww/#findComment-1357397 Share on other sites More sharing options...
Pikachu2000 Posted June 27, 2012 Share Posted June 27, 2012 Ditch all the ridiculous quoting and concatenation and the problems that come with it. Assuming you want the literal string 'PARTIAL' in the database: $query = "INSERT INTO orders VALUES ( '', '$customerid', '{$_SESSION['total_price']}', '$date', 'PARTIAL', '$ship_name', '$ship_address', '$ship_city', '$ship_state', '$ship_zip', '$ship_country' )"; Quote Link to comment https://forums.phpfreaks.com/topic/264870-use-of-undefined-constant-partial-assumed-partial-in-cwampwww/#findComment-1357437 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.