Parse error message
I'm creating a comment form for a website but when I try to connect the page with a database it gives me a parse error.
here are the codes I wrote:
<?php require_once('Connections/localhost.php'); ?>
<?php
//Define Initial Values for Controls
$Name = "";
$Email = "";
$Comment = "";
if(isset($_POST['btnSubmit']))
{
$Error = CheckInput($errEmail,$errName,$Comment);
$Email = mysql_real_escape_string($_POST['txtEmail']);
$Name = mysql_real_escape_string($_POST['txtName']);
$Comment = mysql_real_escape_string($_POST['txtComments']);
if(!$Error)
{
$connections = mysqli_connect($hostname_localhost,$username_localhost,$password_localhost,$database_localhost);
mysql_select_db($database_localhost, $localhost);
$query_Exist = "CALL UserExist('$Name')";
$rslt = mysqli_query($connections,$query_Exist) or die(mysql_error());
$row = mysqli_fetch_row($rslt) ;
mysqli_free_result($rslt);
mysqli_close($Connections);
if ($Email =="" )
{
$lbSuccess ="<font color=red>Error:The User ID [$Uname], is already taken by other staff.";
$lbSuccess .="please write ur user name and email to send your Comment.</font>";
}
else
{
mysql_select_db($database_localhost, $localhost);
$query_Comments = "CALL Comments('$Username','$Email','$Comment'";
$query_Comments .="'$Username','$Email','$Comment'";
$result = mysql_query($query_Comments, $localhost) or die(mysql_error());
$lbSuccess ="Your Comments was successfuly Sent.";
}
}
?>
|