如何在if(条件和条件& if())中进行if语句?

时间:2017-05-08 11:19:35

标签: php

我正在尝试制定条件:如果登录,密码和电子邮件不为空,请运行以下代码,但如果有人在登录名和密码中输入“admin”,我希望代码跳过空电子邮件并继续。我收到以下错误消息:

Parse error: syntax error, unexpected 'if' (T_IF) in C:\xampp\htdocs\page\signup.php on line 16

我的代码:

$dblogin=$_POST["login"];
$dbpassword=$_POST["password"];
$dbemail=$_POST["email"];
$connect = new mysqli('localhost', 'root', '', 'data');
$_SESSION['login'] = $_POST['login'];
$_SESSION['email'] = $_POST['email'];
if(mysqli_connect_errno()==0){
       if((!empty($_POST[login])) && (!empty($_POST[password])) && if($login!=admin & $password!=admin){(!empty($_POST[email]))}){
           $sql = mysqli_query($connect, "SELECT FROM users (dblogin, dbpassword, dbemail) WHERE dblogin=login");

0 个答案:

没有答案