PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<html>
<head>
<title>Update Movies GUI</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"></head>
<body background="../Graphics/backgd.gif">
<h1>Database Movies Update Result</h1></body>
<?php
//Create short variable names. (REGISTER_GLOBALS = OFF)
$Picture = $HTTP_POST_VARS['Picture'];
$filename = $HTTP_POST_VARS['filename'];
mysql_select_db("fuyenhou_freetohost_com");
$query = "insert into image ('id', 'Picture', 'filename') VALUES ('"', '".$Picture."', '".$filename')";
$result = mysql_query($query);
if (!$result)
{
echo ( "<p>Error performing INSERT: ".mysql_error(). "</p>" );
}
else
{
$Itemcode = mysql_insert_id();
print '<h2>The itemcode for this movie is: <B>$Itemcode.</B></h2>';
}
?>
</body>
</html>
Why does this happen??
The error show... Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/vhosts/fuyenhou.freetohost.com/image.php on line 13
And then the above way..cannot works as well
I think do i need to do some connection to the database? are the cause of the error?