以下是试图打印一些语句的 PHP 代码。但它所做的只是打印以下错误:
解析错误:语法错误,第 8 行 C:\Program Files\Apache Group\Apache2\htdocs\chat_status.php 中的意外 T_STRING
编码:
<?php
session_start();
$con=mysql_connect("localhost","hi","hello");
mysql_select_db("my_db",$con);
$check_table=mysql_query("SELECT * FROM `$row[studentid]"."to"."$_GET[id]`);
if($check_table!=FALSE)
{
$asd="no suggestion";
echo $asd;
}
else
{
$result1=mysql_query("SELECT * FROM students WHERE email='$_SESSION[user_name]'");
$row=mysql_fetch_array($result1);
$create_table="CREATE TABLE `$row[studentid]"."to"."$_GET[id]`(post_number int not null
auto_increment,primary key(post_number),data text(20000))";
$result=mysql_query($create_table,$con);
}
?>