/View/header.php';require('..SELECT emailAddress FROM customers WHERE emailAddress ='$email' AND password = '$password'"; echo "DB Error, could not query the database\n";
如果用户只想看到他创建的帖子,我应该如何编写mysql查询?下面是我现在所拥有的:mysql_query("SELECT * FROM timeline ORDER BY dt DESC");
我假设我需要在timeline后面添加一个WHERE来指示用户,但不确定正确的代码是什么会是WHERE $_SESSION['username']吗?
我遵循本教程(https://www.tutorialrepublic.com/php-tutorial/php-mysql-login-system.php),学习如何用PHP和MySQL创建日志系统isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !>
<p>this page is for logged in users only</p>