当我在浏览器中显示此页面时,页面整体上显示正确,但是在php表单本身之后,我可以看到以下代码&#34 ;; ?>在我的提交按钮之后。我不确定为什么我的按钮不起作用我或者我认为它存在同样的问题。
非常肯定一定是我做了些蠢事。
我尝试将孔页设为php文件,也检查错误但我找不到。我会非常感谢任何帮助。
<?php
session_start();
date_defult_timezone_set('Europe/UK');
include 'comments.script.php, dbh.php'
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="comm.css">
<script type="text/javascript" src="java.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<script src="respond.min.js"></script>
<title>Celebrating Rio</title>
<div class="container">
<nav class="navbar navbar-custom">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Celebrating Rio</a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="BestAthletes.html">Best Athletes</a></li>
<li><a href="table.html">Medal Table</a></li>
<li><a href="#">Gallery</a></li>
<li><a href="check.php">Community</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="signup.php"><span class="glyphicon glyphicon-user"></span> Sign Up</a></li>
<li><a href="index.php"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
<li><a href="scripts/logout.script.php"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li>
</ul>
</nav>
</head>
<header class="row">
<div class="col-lg-6 col-sm-6">
<a href="#"><img src="riologo.jpg" id="logo1"class="pull-right img-responsive"></a>
</div>
<div class="col-lg-6 col-sm-6">
<a href="#"><img id="logo"src="logo.jpg"></a>
</div>
</header>
<body id="home">
<div class="video">
<video width="620" height="540" controls>
<source src="Rio.mp4" type="video/mp4">
</video><br>
<?php
echo "<form method='POST' action='".insertComments($conn)."'>
<input type='hidden' name='uid' value='anon'>
<input type='hidden' name='date' value='".date('Y-m-d H:i:s')."'>
<textarea id='txt' name='message'></textarea><br>
<button id='cmtbtn' type='submit' name='commentSubmit'>Comment</button>
</form>";
?>
</div>
</div>
</div>
</body>
</html>