解析错误:语法错误,第12行的C:\ xampp \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
问题描述:
我是新的OOP PHP学习者。我只是想创建一个表并插入我的帖子。然后我遇到了上面的Parse错误。
我尝试过:
I am new OOP PHP learner.I just wanted to create a table and insert my posts.Then I've faced Parse error above.
What I have tried:
<pre><?php
include "db.php";
include "config.php";
$db = new database();
if (isset($_POST['submit'])){
$title = $_POST['title'];
$content = $_POST['content'];
$query = "INSERT INTO posts(title,content) VALUES('$title',$content')"
$run=$db->insert($query);
}
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
<form action="insert_post.php" method="post" enctype="multipart/form-data">
<div class="form-group">
<center><table width="800" align="center" border="2">
<tr bgcolor="orange">
<td colspan="6"><h1 style="text-align:center">Post EDIT</h1></td>
</tr>
<tr>
<td align="right" bgcolor="orange">Post title:</td>
<td><input type="text" name="title" size="60"></td>
</tr>
<tr>
<td align="right" bgcolor="orange">Post Content:</td>
<td><textarea name="Content" rows="15" cols="40"></textarea></td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="orange"><input type="Submit" name="submit" value="Publish Now" /></td>
</tr>
</table>
</form>
答
db = new database();
if (isset(
db = new database(); if (isset(
_POST [' submit'])){
_POST['submit'])){
title =
title =