random nmber generation

the mail() function

Moderators: macek, egami, gesf

tittu
New php-forum User
New php-forum User
Posts: 1
Joined: Sun Jan 29, 2012 7:04 am

random nmber generation

Postby tittu » Sun Jan 29, 2012 7:07 am

how to generate 4 to 6 digit random numbers in the contact form and also need to send it to the admin mail id........

User avatar
bigjoe11a
New php-forum User
New php-forum User
Posts: 137
Joined: Wed Aug 31, 2011 3:55 am
Location: USA
Contact:

Re: random nmber generation

Postby bigjoe11a » Sun Jan 29, 2012 1:21 pm

Here you go.

Code: Select all


$randomNumber = rand(4, 6);



and you use the mail() function to send your message to admin.


Return to “PHP coding => Mail”

Who is online

Users browsing this forum: No registered users and 1 guest