Home  >  Article  >  Backend Development  >  PHP reads and writes operations on the database and random number operations

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

墨辰丷
墨辰丷Original
2018-06-08 11:59:051417browse

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:

pickbtn.php:





ppick u



发布信息

已读标记

ID :
Text :
Date :

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

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!

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