Home >Backend Development >PHP Tutorial >Red Alert 2 Third Reich NO3 Third Reich guestbook production process

Red Alert 2 Third Reich NO3 Third Reich guestbook production process

WBOY
WBOYOriginal
2016-07-29 08:34:211359browse

//Display all messages
$c $db=mysql_select_db("dbname",$conn); $numcolumns=8;//Number of records displayed on each page
$query="select *from guestbook"; $result=mysql_query ($query); $allnums=mysql_num_rows($result);//Calculate the number of all records $numpage=ceil($allnums/$numcolumns);//The guestbook has a total of $numpage pages
$prev=($pagenum- 1)*$numcolumns; $next=$prev+$numcolumns;
if($next>=$allnums)
{ $next=$allnums; $numcolumns=$next-$prev; }//Process the $ of the last page prev,$next
$query="select *from guestbook order by time desc limit $prev,$next ";
$result=mysql_query($query); //Here is the guestbook page
for ($i= 1;$i<=$numcolumns;$i++)
{ $row=mysql_fetch_array($result);
//Show all message pages
----------
-Mobile reply: -According to the reply Person's ID number $id=$row['id']; $queryback="select *from gback where id=$id"; $resultback=mysql_query($queryback); $rowback=mysql_fetch_array($resultback); // Bamboo reply page echo $rowback['noteback'];//Review content echo $rowback['timeback'];//Reply time}//ecd for​​
-----------​​
Processing reply information
$c $db=mysql_select_db("dbname",$conn); $query="select * from phpempire"; $result=mysql_query($query); $row=mysql_fetch_array($result);
if ($password= =$row['password'])
{ $timeback=date("Y-m-d-H:i:s"); $query="insert into gback values('$noteback','$timeback','$id')" ; $result=mysql_query($query);
$message="Please wait...check all messages"; } else { $message="Sorry, only Mozhu can reply! "; }
echo $message; The empire is wonderful because of you
If the browser does not respond for a long time, please click the link here
Process message information:
$c $db=mysql_select_db("dbname",$conn); $ time=date("Y-m-d-H:i:s"); $ip=$REMOTE_ADDR; $query="select *from guestbook"; $result=mysql_query($query); $id=mysql_num_rows($result); $id++; $query="insert into guestbook values('$username','$city','$email','$homepage','$note','$ip','$time',$id)"; $ result=mysql_query($query);
Note: no3 Empire Guestbook
Function Introduction: Able to realize Bamboo reply, Bamboo authentication
Features: Simple structure, expandable functions
Disadvantages: Slow speed
This guestbook can be found at Http:/ /phpempire.net to see the running situation, if you are a little confused about some of the processes of this guestbook, please send me an email!
[The copyright of this article is jointly owned by the author and Oso.com. If you need to reprint, please indicate the author and Source]

The above introduces the process of making the Red Alert 2 Third Reich NO3 Third Reich guestbook, including the content of Red Alert 2 Third Reich. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn