Hallo Im new here and in php coding and i want ask your help..
I have this php code
<?php
ini_set (display_errors',1);
error_reporting (E_ALL & ~E_NOTICE);
if (isset ($_POST['submit'])){
if ($dbc = @mysql_connect('localhost','web','pass'))
{
if (!@mysql_select_db ('web_site'))
{
die('<p> Could not select the database brcause:<b>'. mysql_error() .'</b></p>');
}
}else{
die('<p>Could not connect to MYSQL because:<b>' . mysql_error() . '</b></p>');
}
$query = "INSERT INTO site_entries (id , title , entry , date_entered) VALUES (0, '{$_POST['title']},'{$_POST['enrty']}',NOW())";
if (@mysql_query ($query)){
print '<p>The blog entry has been added.</p>';
}else{
print"<p>Could not add the entry because:<b>" .mysql_error() . "</b>. The query was $query.</p>";
}
mysql_close();
}
?>
Its from an admin panel that i want to create..
when i run the script it returns me this error :
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/admin.php on line 10
Dows anyone knows where is the problem ?
Thanks...a lot