This article mainly introduces how to use PHP to compile examples of newly registered login programs on the school website, including only some key points of simple database information entry and query steps, if you need it, you can refer to the following three pages:
(1) register the new information module (register. php ):
Class Registry
Henan University of Technology sincerely welcomes 2012 new students to study
New student registration system
(2) Information Query logon module (mysql_stu.php ):
New login system
Database creation failed :". mysql_error (); $ result = mysql_select_db (mis_stu) or die ('failed to select mis_stu database :'. mysql_error (); $ createtable = "create table if not exists stu_reg (stu_name varchar (30) not null, stu_sex char (2), stu_age int, stu_class varchar (30 ), stu_id varchar (18), stu_tele varchar (20), stu_email varchar (30) "; $ result = mysql_query ($ createtable) or die ('
Failed to create data table: '. mysql_error (); // select database mysql_select_db (mis_stu); if (! Empty (Three pages are created:
(1) register the new information module (register. php ):
Class Registry
Henan University of Technology sincerely welcomes 2012 new students to study
New student registration system
(2) Information Query logon module (mysql_stu.php ):
___FCKpd___1
(3) query information display module (stu_info.php)
Basic information
Three pages are created:(1) register the new information module (register. php ):
Class Registry
Henan University of Technology sincerely welcomes 2012 new students to study
New student registration system
(2) Information Query logon module (mysql_stu.php ):
New login system
Database creation failed :". mysql_error (); $ result = mysql_select_db (mis_stu) or die ('failed to select mis_stu database :'. mysql_error (); $ createtable = "create table if not exists stu_reg (stu_name varchar (30) not null, stu_sex char (2), stu_age int, stu_class varchar (30 ), stu_id varchar (18), stu_tele varchar (20), stu_email varchar (30) "; $ result = mysql_query ($ createtable) or die ('
Failed to create data table: '. mysql_error (); // select database mysql_select_db (mis_stu); if (! Empty (Three pages are created:
(1) register the new information module (register. php ):
Class Registry
Henan University of Technology sincerely welcomes 2012 new students to study
New student registration system
(2) Information Query logon module (mysql_stu.php ):
___FCKpd___1
(3) query information display module (stu_info.php)
___FCKpd___2
POST ['Reg _ name']) {$ name =Three pages are created:
(1) register the new information module (register. php ):
Class Registry
Henan University of Technology sincerely welcomes 2012 new students to study
New student registration system
(2) Information Query logon module (mysql_stu.php ):
___FCKpd___1
(3) query information display module (stu_info.php)
___FCKpd___2
POST ['Reg _ name']; $ sex =Three pages are created:
(1) register the new information module (register. php ):
Class Registry
Henan University of Technology sincerely welcomes 2012 new students to study
New student registration system
(2) Information Query logon module (mysql_stu.php ):
___FCKpd___1
(3) query information display module (stu_info.php)
___FCKpd___2
POST ['Reg _ sex']; $ age =Three pages are created:
(1) register the new information module (register. php ):
Class Registry
Henan University of Technology sincerely welcomes 2012 new students to study
New student registration system
(2) Information Query logon module (mysql_stu.php ):
___FCKpd___1
(3) query information display module (stu_info.php)
___FCKpd___2
POST ['Reg _ age']; $ class =Three pages are created:
(1) register the new information module (register. php ):
Class Registry
Henan University of Technology sincerely welcomes 2012 new students to study
New student registration system
(2) Information Query logon module (mysql_stu.php ):
___FCKpd___1
(3) query information display module (stu_info.php)
___FCKpd___2
POST ['Reg _ class']; $ id =Three pages are created:
(1) register the new information module (register. php ):
Class Registry
Henan University of Technology sincerely welcomes 2012 new students to study
New student registration system
(2) Information Query logon module (mysql_stu.php ):
___FCKpd___1
(3) query information display module (stu_info.php)
___FCKpd___2
POST ['Reg _ id']; $ tele =Three pages are created:
(1) register the new information module (register. php ):
Class Registry
Henan University of Technology sincerely welcomes 2012 new students to study
New student registration system
(2) Information Query logon module (mysql_stu.php ):
___FCKpd___1
(3) query information display module (stu_info.php)
___FCKpd___2
POST ['Reg _ tele']; $ email =Three pages are created:
(1) register the new information module (register. php ):
Class Registry
Henan University of Technology sincerely welcomes 2012 new students to study
New student registration system
(2) Information Query logon module (mysql_stu.php ):
___FCKpd___1
(3) query information display module (stu_info.php)
___FCKpd___2
POST ['Reg _ email ']; // defines the SQL string mysql_query ("set names gb2312") inserted into the stu_reg table; $ SQL = "insert into stu_reg (stu_name, stu_sex, stu_age, stu_class, stu_id, stu_tele, stu_email) values ('$ name',' $ sex', '$ age',' $ class', '$ ID ', '$ tele',' $ email ') "; mysql_query ($ SQL); mysql_query (" COMMIT "); echo"
Congratulations! registration successful!
Enter the following content to log on to the system to query registration information.