Jump to content

rocket

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Posts posted by rocket

  1. Hi, I am racking my brain to think of a solution for this. I have a website where the customer can have 1 of 3, or 2 of 3 outcomes.
    The customer orders holiday cards for me to send to recipients.
    The customer enters the date the recipients should receive the mail piece.
    If they need a rush, recipients will receive the mail piece within 5 days.
    If they don't need a rush, recipients will receive the mail piece after 5 days.
    If they order by November 15, they get a 10% discount.

    So I have the date that the customer enters in as, $month (m), $day (d), $year (Y). $recipship and $discount are the final variables to be carried on as session variables.

    <?php
    $day = $_POST['day'];
    $_SESSION['day'] = $day;

    $month = $_POST['month'];
    $_SESSION['month'] = $month;

    $year = $_POST['year'];
    $_SESSION['year'] = $year;

    $promotime = 1163556000;//this is November 15th 2006 timestamp. If ordered on or before this date, the cust gets 10% off.

    $now = time();//now

    $duedate = strtotime($month . $day . $year 00:00:00);//the customer entered in when the recipients should receive the cards and I'm trying to convert to timestamp

    $rush = time() < (5 * 24 * 60 * 60);//this is supposed to equate (in timestamp form) that a rush will apply if the date entered is within 5 days from now.

    $standard = time() >= (6 * 24 * 60 * 60);//this is supposed to equate (in timestamp form) that standard shipping will apply if the date entered is 6 days or more from now.

    //here are my conditions to be met:

    if ($duedate > $standard){
    $recipship = 'Standard delivery, within 10 business days, $.09 per card additional plus postage.';
    }

    elseif ($duedate <= $rush){
    $recipship = '5 days, $15.00 rush fee, $.09 per card plus postage.';

    }


    elseif ($now <= $promotime){
    $discount = .90;

    }


    ?>


    Do I just have is all wrong??? Do I need to find a difference somewhere? I really don't know if I have the booleans right and I don't know if I have the variables defined correctly for the outcome that I want.

    Finally, my problem is that none of the variables, $recipship or $discount are being carried through as session variables to the next page. So something is not right-

    Any help, any explaination, anything will help me. very newbie, so go easy.

    Thanks
  2. I am trying to piece together some slices (new to this) and I have a table which I want a graphic to appear outside as well as inside. I don't quite know the appropriate approach. Check this url out and you will see. Should I use CSS or more tables??? I want the graphic to "line up." Any input would be appreciated!! http://www.vitations.com/portfolio/home.php
×
×
  • 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.