How to use PHP to read, judge and log in to the database

墨辰丷
Release: 2023-03-30 21:26:02
Original
1963 people have browsed it

This article mainly introduces how to use PHP to read, judge and log in to the database. Interested friends can refer to it. I hope it will be helpful to everyone.

The example in this article describes how PHP implements the method of identifying users to send emails through the get method. The details are as follows:

send_email.php is as follows:

alert('?????????');";
    echo "";
  }
?>
Copy after login

reg.php is as follows:

查看邮件
"; } ?>
Copy after login

newfile.php is as follows:

";
echo $out["created_at"]."
"; echo "发送邮件

"; //看看有没有新邮件 $sql_search_email="select * from email where accepter_id='".$id."'"; $query=mysql_query($sql_search_email); $result_email=mysql_fetch_array($query); if($result_email["accepter_id"]==$_SESSION["id"]&&$result_email["flag"]=="no") { echo "您有新邮件"; } ?>
Copy after login

login.php is as follows:

清除session";
  echo "重新注册";
?>
Copy after login

delete_session.php is as follows:

alert('清除成功');";
?>
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:

Implemented a rating function based on jQuery through PHP and mysql

How to use and introduce the PHP Closure class

php ajax real-time input automatic search matching method

The above is the detailed content of How to use PHP to read, judge and log in to the database. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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!