这段代码不起作用 - 它说我在 ** 行上有意外的 T_STRING 错误..它真的让我很烦恼..它可能是基本的,但我有点菜鸟,所以任何帮助都会很棒!
<?php
$dbhost = 'localhost';
$dbname = 'main';
$dbuser = 'root';
$dbpass = '';
$tbl_name="business";
$country = $_POST['country'];
$name = $_POST['name'];
$business_name= $_POST['business_name'];
$address1= $_POST['address1'];
$address2= $_POST['address2'];
$city= $_POST['city'];
$county= $_POST['county'];
$zip= $_POST['zip'];
$phone = $_POST['phone'];
$web_address = $_POST['web_address'];
$email= $_POST['email'];
$password=$_POST['password'];
$open= $_POST['open'];
$closed= $_POST['closed'];
$description=$_POST['description']
**mysql_connect("$dbhost", "$dbuser", "$dbpass") or die (mysql_error());**
mysql_select_db("$dbname") or die (mysql_error());
$sql_insert = "INSERT INTO $tbl_name VALUES ('','$country','$name','$business_name','$address1','$address2','$city','$county','$zip','$ phone','$web_address','$email','$password','$open','$closed','$description');";
$result=mysql_query($sql_insert);
$rows = mysql_num_rows($result);
if($result){
echo "Successful";
echo "<BR>";
}
else {
echo "ERROR";
}
mysql_close();
?>