PHP reads and writes operations on the database and random number operations

墨辰丷
Release: 2023-03-30 18:20:01
Original
1405 people have browsed it

This article mainly introduces PHP's read and write operations for databases and random number operations. Interested friends can refer to it. I hope it will be helpful to everyone.

The details are as follows:

mysql.php:

Copy after login

pickbtn.php:





ppick u



发布信息

已读标记

ID :
Text :
Date :
Copy after login

throwbtn.php:





微软雅黑



截取信息
';
  $author = $_REQUEST['author'];
  $text = $_REQUEST['text'];
  $date = date('Y-m-d h:m:s');
  if(!(null == trim($author)) && !(null == trim($text))) {
  $q = "insert into `btn`(`id`,`author`,`text`,`date`,`flag`) values('','$author','$text','$date','0')";
  mysql_query($q);
  }
}
?>
ID
Text
Date

Copy after login

Summary: The above is the entire content of this article, I hope it will be helpful to everyone's study.

Related recommendations:

php Judgment of the current encoding and corresponding encoding conversion implementation skills

php How to use the MagickWand module to operate pictures and add watermarks

php uses the history function

The above is the detailed content of PHP reads and writes operations on the database and random number operations. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
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 [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!