Desktop Center (4) Data Display_PHP Tutorial
The last step is to display.
The following program needs to be called through parameters.
For example, php(as the current mainstream development language).php(as the current mainstream development language)?jpg=jpg
The jpg behind is the table name . Remember it is necessary, otherwise it will not run and a program error will be displayed.
You can change the program below. This will make it more beautiful.
以下是源程序:
MySQL(和PHP搭配之最佳组合)_connect("localhost","用户名","密码") or die("无法联接数据库!");
$query="SELECT id,url,mess,fromx,url1,mess1,fromx1,url2,mess2,fromx2,url3,mess3,fromx3 from $jpg " ;
$result=MySQL(和PHP搭配之最佳组合)_db_query("elong",$query); //执行查询
$num=MySQL(和PHP搭配之最佳组合)_numrows($result);
$page=round($page);
$pagesize=4;
if ($page==0){
$page=1;}
else{
$page=$page;}
$pagecount=($num)/$pagesize;
$pagecount=ceil($pagecount);
?>
printf("首页",$php(做为现在的主流开发语言)_SELF,1);
printf(" 前页",$php(做为现在的主流开发语言)_SELF,$page-1);
}else{
?> 首页 前页
}
?>
printf(" 后页",$php(做为现在的主流开发语言)_SELF,$page+1);
printf(" 尾页",$php(做为现在的主流开发语言)_SELF,$pagecount);
}else{?> 后页 尾页 }?>页次:/页
if ($num<>0){
$pp=0;
for($ipage=0;$ipage<$pagesize;$ipage++){
$i=($page-1)*$pagesize+$ipage;
if($i < $num) {
$id=MySQL(和PHP搭配之最佳组合)_result($result,$i,"id");
$url=MySQL(和PHP搭配之最佳组合)_result($result,$i,"url");
$mess=MySQL(和PHP搭配之最佳组合)_result($result,$i,"mess");
$fromx=MySQL(和PHP搭配之最佳组合)_result($result,$i,"fromx");
$url1=MySQL(和PHP搭配之最佳组合)_result($result,$i,"url1");
$mess1=MySQL(和PHP搭配之最佳组合)_result($result,$i,"mess1");
$fromx1=MySQL(和PHP搭配之最佳组合)_result($result,$i,"fromx1");
$url2=MySQL(和PHP搭配之最佳组合)_result($result,$i,"url2");
$mess2=MySQL(和PHP搭配之最佳组合)_result($result,$i,"mess2");
$fromx2=MySQL(和PHP搭配之最佳组合)_result($result,$i,"fromx2");
$url3=MySQL(和PHP搭配之最佳组合)_result($result,$i,"url3");
$mess3=MySQL(和PHP搭配之最佳组合)_result($result,$i,"mess3");
$fromx3=MySQL(和PHP搭配之最佳组合)_result($result,$i,"fromx3");
$pp=$pp+1;
?>
|
}
}
}
?>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

In this chapter, we are going to learn the following topics related to routing ?

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Working with database in CakePHP is very easy. We will understand the CRUD (Create, Read, Update, Delete) operations in this chapter.

Validator can be created by adding the following two lines in the controller.
