解析错误:语法错误和文件意外结束

时间:2019-01-07 16:28:32

标签: php html

语法错误,第110行的C:\ xampp \ htdocs \ DAS \ hospital.php中文件意外结束

我试图找到问题,但我找不到。 它使用while循环重复显示从设计(从登录/注册到)开始存储在数据库中的数据。

这是我的php代码

<?php include('patientreg(php).php'); ?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
  <div class="search1">
      <form method="post" action="search.php">

           <select name="srch">
           <option>ID</option>
           <option>Name</option>
           <option>Intake</option>
           <option>Gender</option>
           <option>Address</option></select>

           <input type="text" name="textsearch" placeholder="type to search"/>
           <input type="SUBMIT" name="search1" value="search" />

      </form>
  </div>

  <div class="content">
     <img src = "user1.png" width="60" height="60"/>
     <?php if(isset($_SESSION["username"])): ?>
     <h2><?php echo $_SESSION['username']; ?></h2>
     <?php endif ?>
  </div> 
 <?php
$host= 'localhost';
$user= 'root';
$pass = '';
$db = 'db';

$mysqli = new mysqli($host,$user,$pass,$db);

$result = $mysqli->query
          ("SELECT * FROM hospital ") or die($mysqli->error);

?>
<div class='main-container'> 
<?php
while($movie = $result->fetch_assoc()): ?>
     <div class='movie-container'>
        <div class='header'>
            <h1><?=$movie['h.name'] ?></h1>
            <span class='year'>( <?= $movie['h.code'] ?> ) </span>
        </div>
</div>
</div>  
</body>
</html>

0 个答案:

没有答案