Wednesday, December 19, 2012

About PHP / MySQL: How to Generate a Random Number with PHP

If you can't see this email, click here

About.com

PHP / MySQL

PHP Basics

MySQL Basics

Advanced Skills



From Angela Bradley, your Guide to PHP / MySQL
Hello PHP Programmers!
In this newsletter we take a look at how you can use random numbers in your PHP programs. We also look at the difference between cookies and sessions. Happy Holidays everyone!
Have a great week!

Random Numbers
There are lots of different reason you may want to generate a random number. PHP can generate a random number over a very large range, or pick randomly between only two or three choices. You can set these parameters when you generate the number.
Search Related Topics:  php code examples  random number 

The Difference Between Cookies and Sessions
The main difference between cookies and sessions is that cookies are stored in the user's browser, and sessions are not. This difference determines what each is best used for.
Search Related Topics:  php code examples  sessions  cookies

Finding the HTTP_REFERER
The page referrer is found by using the $HTTP_REFERER variable. This is a quick way of looking up where people are navigating to your pages from. Once you know this information you can also filter users based upon it. For example, you only let people who come from one of your referring pages to use your downloads section, etc.
Search Related Topics:  php code examples  php basic functions 



 


Related Searches
Featured Articles
Troubleshooting
Programing Glossary
Reader Response
Social Networking with PHP @ About.com
Learn PHP
Learn MySQL

 

More from About.com

The Perfect Engagement Ring
How to find a gorgeous ring with a style and price that suit your needs. Read more...>



Hometown Holidays
Discover the best holiday events near your hometown. Read more...>




This newsletter is written by:
Angela Bradley
PHP / MySQL Guide
Email Me | My Blog | My Forum
 
Sign up for more free newsletters on your favorite topics
You are receiving this newsletter because you subscribed to the About.com PHP / MySQL newsletter. If you wish to change your email address or unsubscribe, please click here.

About.com respects your privacy: Our Privacy Policy

Contact Information:
249 West 17th Street
New York, NY, 10011

© 2012 About.com
 


Must Reads
Learn PHP
Using PHP with MySQL
Learn MySQL
Create Email Forms
PHP Login Script
 
Follow me on:
Facebook Twitter

Advertisement

No comments:

Post a Comment