<?php
if(isset($_POST['submitregister']))
{
include('lib/connection.php');
$email=$_POST['email'];
$username=$_POST['username'];
$password=$_POST['password'];
$sql=" INSERT INTO users (Email,UserName,Password) VALUES('$email','$username','$password')";
$result=mysqli_query($conn,$sql) or die("The query is not correct");
if($result)
{
echo "<script>alert('You have been registered');</script>";
}
else
{
echo "<script>alert('Error in registration');</script>";
}
}
if(isset($_POST['submitlogin']))
{
include('lib/connection.php');
$username=$_POST['username'];
$password=$_POST['password'];
$sql="SELECT ID FROM users WHERE UserName='$username' AND Password='$password'";
$result=mysqli_query($conn,$sql) or die("The query is not right");
$row=mysqli_num_rows($result);
if($row==1)
{
echo "<script>alert('You are logged in');</script>";
}
else{
echo "<script>alert('You are not logged in');</script>";
}
}
if(isset($_POST['submitsearch']))
{
include('lib/connection.php');
$searched=$_POST['search'];
$sql="SELECT * FROM users WHERE UserName='$searched'";
$result=mysqli_query($conn,$sql) or die("The query is not right");
$row=mysqli_num_rows($result);
while($row=mysqli_fetch_array($result,MYSQLI_ASSOC))
{?>
<table>
<tr>
<td><?php echo "$row[ID]";?></td>
<td><?php echo "$row[UserName]";?></td>
<td><?php echo "$row[Password]";?></td>
</tr>
</table>
<?php}?>
<?php}?>
不显示输出
解析错误:语法错误,第80行的C:\ xampp \ htdocs \ CMS \ processing.php中的文件意外结束
错误即将出现在php代码中我写了我的php文件所以请告诉我这个问题的解决方案
这个问题的解决方案是什么?