PHP and educational technology. First understanding PHP, first learning education technology 1. in PHP, all global variables must be capitalized; 2. in the PHP form submission method, the method attribute sets the method for obtaining and submitting data. 3. if PHP is first recognized in the form, education technology is first recognized.
1. in PHP, all global variables must be capitalized;
2. in the PHP form submission method, the method attribute sets the method for obtaining and submitting data;
3. if an upload element is used in a form, you must add the following attributes to the form: enctype = "multipart/form-data ";
4. implementation of the logout user function:
The code is as follows:
<? Php
Session_start (); // start the session
Unset ($ _ SESSION ['user']); // deletes a single SESSION
Unset ($ _ SESSION ['pwd']); // deletes a single SESSION
Session_destory (); // ends the current session
Header ("location: index. php"); // redirect
?>
Delete multiple sessions: $ _ SESSION = array ();
5. Traverse objects in php:
The code is as follows:
For ($ I = 0; $ I // Process
}
6. php contains files: include ("file path ");
7. how to embed js scripts in the HTML page:
The code is as follows: