Jump to content

Auto generate a order number gets send to emailadres


babiche

Recommended Posts

Hello,

 

is there a short script to get a number send with the email, every time a different new number? this php loads variables from flash swf

see below

 

<?php

$sendTo = "[email protected]";

$subject = "Bumper Order";    <<<<<<<here should be an automatic number

$headers = "From: " . $_POST["name"] ." <" . $_POST["email"] .">\r\n";

$headers .= "Reply-To: " . $_POST["email"] . "\r\n";

$headers .= "Return-Path: " . $_POST["email"];

$message = "Product: " . $_POST["product"] . 

" Quantity: " . $_POST["quantity"];    <<<<<<<here should be an automatic number

 

mail($sendTo, $subject, $message, $headers);

 

?>

 

 

thx

function createRandomword() 
{    $chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz023456789";
srand((double)microtime()*1000000);
$i = 0;
$pass = '' ;    
while ($i <= 10) 
{            $num = rand() % 33;        
            $tmp = substr($chars, $num, 1);        
            $pass = $pass . $tmp;  
            $i++;    
}    
return $pass;
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.