Welcome to WebmasterWorld Guest from 54.162.240.235

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

contact form with auto generated confirmation number

php, auto generated, mail form, confirmation , code, script,send

     
11:02 pm on Jan 9, 2010 (gmt 0)

5+ Year Member



Hi All,

I am trying to create a php mail form that upon submission it will generated a confirmation code and send it to both the client and the admin.

I don;t have any problems creating the form, or even make an email be sent back to the user (client) once they have filled it out.

my question is the auto generated confirmation number, and how can I added into the reciept to be sent both to sender and receiver.

Any help is much appreciated.

8:46 pm on Jan 10, 2010 (gmt 0)

WebmasterWorld Senior Member themadscientist is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



How about something like: $Confirm='CN_'.time().'_'.rand(0,9);

I added a single random number to the end of the string on the off chance there is a collision on the exact time a message is sent... It should not effect ordering or sorting and the time can easily be extracted from it. Anyway, my first thought for a quick, simple unique confirmation number.

7:55 am on Jan 11, 2010 (gmt 0)

5+ Year Member



Hi TheMadScientist, So Can i just echo out $confirm?
7:59 am on Jan 11, 2010 (gmt 0)

5+ Year Member



Hi TheMadScientist, So how would I include it to be sent both to recipient and sender so both parties can get same confirmation code.

Thanks for all your help.

6:05 pm on Jan 11, 2010 (gmt 0)

WebmasterWorld Senior Member themadscientist is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Without seeing the code you are using I can't really tell you what to do, except to say, put the variable $confirm in the message body...

mail('recipient email','subject',"Confirmation Number: ".$confirm."\n\nmessage text",'headers');

 

Featured Threads

Hot Threads This Week

Hot Threads This Month