Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

random nmber generation

the mail() function

Moderators: macek, egami, gesf

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........
New php-forum User
New php-forum User
Posts: 1
Joined: Sun Jan 29, 2012 7:04 am

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.
User avatar
New php-forum User
New php-forum User
Posts: 128
Joined: Wed Aug 31, 2011 3:55 am
Location: USA

Return to PHP coding => Mail

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.