Basic PHP Tutorial-Learning Summary
One, PHP and forms
1.POST method to send data manually:
The two are partly different:
GET:
1. Send information together as part of a URL
2. Limited number of transfers
3. Public transmission, such as password information will be exposed
4. Create a form that can be added as a bookmark.
POST:
1. Delivery of information users cannot see
Usage examples:
HTML file: ws.html
Test
PHP File: handle.php
Test
$title =$_post[' title '; $name =$_post[' name ']; Print "$title $name";? >
Input: MyName
Result: Hello Mr myname
2.GET transmitting data
Test
- "Handle.php?name=charles" >charles
PHP File: handle.php
Test
$name =$_get[' name '];p rint "Hello $name ";? >
Second, the correlation function study
1. Format the values:
Round (the number to be formatted, the number of decimal places reserved);
eg: $test = 5.555555555; Round (test, 2); 5.55
Number_format (number, number of decimal places, symbol in place of decimal point, thousand separator)
Eg:number_format ("10000000", 2, ",", "."); /10.000.000,00
2. Random function rand ()
Eg:rand (0, 100);//Generate 0-100 random one number
http://www.bkjia.com/PHPjc/953328.html www.bkjia.com true http://www.bkjia.com/PHPjc/953328.html techarticle PHP Basic Tutorial--Learning Summary One, PHP and form 1.POST methods to send data manually: The two parts of the difference: get:1. To gather information as part of a URL 2. Limited number of transfers ...