Current location - Education and Training Encyclopedia - Resume - Create a php page to generate information in your resume.
Create a php page to generate information in your resume.
Call the specified ID, such as viewing Zhang San's resume.

& lt? Server-side programming language (abbreviation of professional hypertext preprocessor)

$link=mysql_connect("localhost "," root "," root "); //Account number, password

If (! $link)? Echo? "No connection succeeded!" ;

mysql_select_db("data 1 ",$ link); //Select a database?

mysql_set_charset('utf8 ',? $ link); ?

$sql? =? "choose? *? From where? Information? Where is it? id = 1 "; //SQL query statement, which specifies the ID to be obtained, and info is the table name.

$rs? =? mysql_query($sql,? $ link); //Get the data set?

$ row = MySQL _ fetch _ array($ RS);

& gt

& lt table? width="505 "? border = " 0 " & gt

& lttr & gt

& lttd? bgcolor = " # CCCCCC " & gt; & ampnbsp Name

& lttd? bgcolor = " # CCCCCC " & gt; & ampnbsp Age

& lttd? bgcolor = " # CCCCCC " & gt; & ampnbsp Gender

& lttd? bgcolor = " # CCCCCC " & gt; & ampnbsp native place

& lt/tr & gt;

& lttr & gt

& lttd & gt& ampnbsp& lt? php? Echo? $ row[' name ']; ? & gt& lt/TD & gt;

& lttd & gt& ampnbsp& lt? php? Echo? $ row[' age ']; ? & gt& lt/TD & gt;

& lttd & gt& ampnbsp& lt? php? Echo? $ row[' sex ']; ? & gt& lt/TD & gt;

& lttd & gt& ampnbsp& lt? php? Echo? $ row[' homeland ']; ? & gt& lt/TD & gt;

& lt/tr & gt;

& lt/table & gt; It will output the compilation information of Zhang San.

I created the database data 1 as you said, and the encoding is utf8 format. Please pay attention to yourself.