Desktop center (4) Data Display. The last step is to display it. The following program is called Through parameters. For example, php (as the mainstream development language). php (as the mainstream development language )? The last step after jpg is displayed.
The following program is called Through parameters.
For example, php (as the mainstream development language). php (as the mainstream development language )? Jpg = jpg
Jpg is the name of the table. Remember This. Otherwise, the program will fail and an error will be displayed.
You can change the following program. In this way, it will be more beautiful.
The following is the source program:
Display
MySQL (the best combination with PHP) _ connect ("localhost", "username", "password") or die ("cannot connect to the database! ");
$ Query = "SELECT id, url, mess, fromx, url1, mess1, fromx1, url2, mess2, fromx2, url3, mess3, fromx3 from $ jpg ";
$ Result = MySQL (the best combination with PHP) _ db_query ("elong", $ query); // execute the query
$ Num = MySQL (the best combination with PHP) _ numrows ($ result );
$ Page = round ($ page );
$ Pagesize = 4;
If ($ page = 0 ){
$ Page = 1 ;}
Else {
$ Page = $ page ;}
$ Pagecount = ($ num)/$ pagesize;
$ Pagecount = ceil ($ pagecount );
?>
Printf ("homepage", $ php (as the mainstream development language) _ SELF, 1 );
Printf ("Front page", $ php (as the current mainstream development language) _ SELF, $ page-1 );
} Else {
?> Homepage front page }
?>
Printf ("", $ php (as the mainstream development language) _ SELF, $ page + 1 );
Printf ("last page", $ php (as the mainstream development language) _ SELF, $ pagecount );
} Else {?> Last page Page:
/
Page
If ($ num <> 0 ){
$ Pp = 0;
For ($ ipage = 0; $ ipage <$ pagesize; $ ipage ++ ){
$ I = ($ page-1) * $ pagesize + $ ipage;
If ($ I <$ num ){
$ Id = MySQL (the best combination with PHP) _ result ($ result, $ I, "id ");
$ Url = MySQL (the best combination with PHP) _ result ($ result, $ I, "url ");
$ Mess = MySQL (the best combination with PHP) _ result ($ result, $ I, "mess ");
$ Fromx = MySQL (the best combination with PHP) _ result ($ result, $ I, "fromx ");
$ Url1 = MySQL (the best combination with PHP) _ result ($ result, $ I, "url1 ");
$ Mess1 = MySQL (the best combination with PHP) _ result ($ result, $ I, "mess1 ");
$ Fromx1 = MySQL (the best combination with PHP) _ result ($ result, $ I, "fromx1 ");
$ Url2 = MySQL (the best combination with PHP) _ result ($ result, $ I, "url2 ");
$ Mess2 = MySQL (the best combination with PHP) _ result ($ result, $ I, "mess2 ");
$ Fromx2 = MySQL (the best combination with PHP) _ result ($ result, $ I, "fromx2 ");
$ Url3 = MySQL (the best combination with PHP) _ result ($ result, $ I, "url3 ");
$ Mess3 = MySQL (the best combination with PHP) _ result ($ result, $ I, "mess3 ");
$ Fromx3 = MySQL (the best combination with PHP) _ result ($ result, $ I, "fromx3 ");
$ Pp = $ pp + 1;
?>
"Target =" _ blank ">" width = "160" height = "120" border = "4"> |
"Target =" _ blank ">" width = "160" height = "120" border = "4"> |
"Target =" _ blank ">" width = "160" height = "120" border = "4"> |
"Target =" _ blank ">" width = "160" height = "120" border = "4"> |
}
}
}
?>
Paging
Bytes. The following program is called Through parameters. For example, php (as the mainstream development language). php (as the mainstream development language )? Jpg = after jpg...