MySQL Forums
Forum List  »  PHP

Update file
Posted by: Paulo Monteiro
Date: April 19, 2006 09:23AM

In the next code there is an error in sql code, that I donĀ“t understand:

if (is_uploaded_file($_FILES['file']['tmp_name'])) {
move_uploaded_file($_FILES['file']['tmp_name'], "imagens/cine/".$_FILES['file']['name']);
if (is_file("imagens/cine/".$_FILES['file']['name'])) {
$sql = "update cinema set titulo_mes = '".$_POST["titulo_mes"]."', dia_sem = '".$_POST["dia_sem"]."', dia_mes = '".$_POST["dia_mes"]."', foto = "'imagens/cine/'.$_FILES["file"]["name"]."', titulo_film = '".$_POST["titulo_film"]."', realizador = '".$_POST["realizador"]."', actores = '".$_POST["actores"]."', ano = '".$_POST["ano"]."', pais = '".$_POST["pais"]."', idade = '".$_POST["idade"]."', duracao = '".$_POST["duracao"]."', genero = '".$_POST["genero"]."', site = '".$_POST["site"]."', trailer = '".$_POST["trailer"]."', descricao = '".$_POST["descricao"]."' where film_ID = ".$_POST["film_ID"];
$query = query($sql) or die ("Query failed: " . mysql_error() . " Actual query: " . $sql);

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in c:\ftproot\www\cm-lousa.pt\2.0\admin\cinema.php on line 54


What can I do for resolve it??

Options: ReplyQuote


Subject
Written By
Posted
Update file
April 19, 2006 09:23AM
April 19, 2006 09:59AM
April 19, 2006 10:04AM
April 19, 2006 10:32AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.