~alex~
2007-06-15 19:43:17
Can anybody help me get rid of this error? The problem is wit hthe $_POST bit.. something to do with quotes i think.
'Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /mnt/w0906/d42/s05/b02b2d42/www/scaralex.com/test/insert.php on line 9'
Heres the code.
[PHP]
<?php
$con = mysql_connect("localhost","","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("d60385032", $con);
mysql_query("UPDATE randoms Info SET mime = $_POST['mime']
WHERE name = 'blah'");
?>
[/PHP]
'Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /mnt/w0906/d42/s05/b02b2d42/www/scaralex.com/test/insert.php on line 9'
Heres the code.
[PHP]
<?php
$con = mysql_connect("localhost","","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("d60385032", $con);
mysql_query("UPDATE randoms Info SET mime = $_POST['mime']
WHERE name = 'blah'");
?>
[/PHP]