Jump to content

chrismars

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

chrismars's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. yeah but this does manipulate the date but back to 1970... cant figure out why.
  2. <p>Date Can Be Processed:* <br> <input type="text" name="DCP" class="field" value="<?php echo date("d/m/Y"); ?>" tabindex="7"> above is the input for the user to input the date, its set to a default atm but if the customer inputs their own i want it to give the date +120 in D/M/Y format. im not sure how to get that in to the exisiting code so it outputs in the email sent.
  3. Hi, I had an account a while back but lost it lol... need a little help... prob simple but cant figure it... i want to have a user input a date and for php to work out that date 120 days later... thing is i want this to be emailed... basic code so far and it works but cant get it to work with the date maniplation. <?php // get posted data into local variables $EmailFrom = Trim(stripslashes($_POST['EmailFrom'])); $EmailTo = "my email is here!!!"; $Subject = "DEAL:"; $Deal = Trim(stripslashes($_POST['Deal'])); $Sites = Trim(stripslashes($_POST['Sites'])); $TOS = Trim(stripslashes($_POST['TOS'])); $SST = Trim(stripslashes($_POST['SST'])); $DV = Trim(stripslashes($_POST['DV'])); $DCP = Trim(stripslashes($_POST['DCP'])); $NOTES = Trim(stripslashes($_POST['NOTES'])); $Status = Trim(stripslashes($_POST['Status'])); // validation $validationOK=true; if (Trim($Deal)=="") $validationOK=false; if (Trim($EmailFrom)=="") $validationOK=false; if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=error.php\">"; exit; } // prepare email body text $Body = ""; $Body .= "Deal Done By: "; $Body .= $EmailFrom; $Body .= "\n"; $Body .= "\n"; $Body .= "Deal Name: "; $Body .= $Deal; $Body .= "\n"; $Body .= "\n"; $Body .= "Number Of Sites: "; $Body .= $Sites; $Body .= "\n"; $Body .= "\n"; $Body .= "Type Of Sale: "; $Body .= $TOS; $Body .= "\n"; $Body .= "\n"; $Body .= "Supplier Signed To: "; $Body .= $SST; $Body .= "\n"; $Body .= "\n"; $Body .= "Deal Value: "; $Body .= $DV; $Body .= "\n"; $Body .= "\n"; $Body .= "Notes: "; $Body .= $NOTES; $Body .= "\n"; $Body .= "\n"; $Body .= "Date Can Be Processed: "; $Body .= $DCP; $Body .= "\n"; $Body .= "\n"; $Body .= $Status; $Body .= "\n"; $Body .= "\n"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); // redirect to success page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=oksub.php\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=error.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.