Jump to content

maxxd

Gurus
  • Posts

    1,705
  • Joined

  • Last visited

  • Days Won

    54

Everything posted by maxxd

  1. Database::__construct() requires a string parameter named $filename that you don't pass in from mainClass::con2DB().
  2. I'm assuming from your description that you're working procedurally and putting the 'cart' array into a session variable? if so, it'd be possible to add more session variables ('gcNumber', 'message', and 'eAddy', perhaps) then unset them at checkout once the total has been calculated and you've recieved a success message from your payment gateway. Or at least after the data has been processed in whatever way it's being processed - as long as the script doesn't just blithely keep subtracting the gift card discount amount from the cart amount if the user hits refresh. Although, honestly, it may be worth your while to look into updating to an object oriented style where you've got a store class that aggregates a cart object, where you would store individual item objects that include the size and id. The cart object would then keep track of and handle the gift card, personal message, and e-mail information at the proper time in the store class's timeline.
  3. To expound on what MargateSteve said, use isset() with the $_SESSION superglobal in this situation - something along the lines of: if(!isset($_SESSION['pass'])){ //do whatever }
  4. maxxd

    Hello

    Hey y'all. I've been coding php pretty steadily since the early to mid 90's and am always looking for more knowledge, new viewpoints, other advice, and to help out wherever I can. I took a quick look-see through the forums here and it looks like a nice place (and far more active than some of the other forums I tend to lurk at), so I created an account and here I am! I like long walks on the beach, moonlight, OO-style PHP, and using print() instead of echo. I also like curly braces and get confused easily when my co-workers don't use them in their conditionals, but I attribute that last one to old age and failing eyes... In all seriousness, I'm not sure how much I'll be around - let alone how much help I can offer to anyone when I am - but I wanted to say hi! - maxxd
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.