PHPcode & lt ;? PhpclassIndexActionextendsYouYaX {publicfunctionindex () {header (& quot; Content-type: texthtml; charsetutf-8 & quot;); database storage for sharing personal information and more
PHP code
Select ("select info from personal_info"); $ dat = array (); foreach ($ data as $ v) {$ tmp = unserialize ($ v ['info']); $ tmp [2] = $ tmp [2] = "0 "? "Male": "female"; $ dat [] = $ tmp;} $ this-> assign ('data', $ dat ); $ this-> display ("index.html");} public function Adds () {$ arr [] = $ _ POST ['per _ name']; $ arr [] =$ _ POST ['per _ age']; $ arr [] =$ _ POST ['per _ sex']; $ data ['info'] = serialize ($ arr); $ this-> add ($ data, "personal_info "); $ this-> redirect ("Index/index") ;}}?>
HTML code
Welcome YouYaX
| Name |
Age |
Gender |
| {Data.0} |
{Data.1} |
{Data.2} |
------ Solution --------------------
Ah, share?
------ Solution --------------------
What framework is used?
------ Solution --------------------
TP at first glance