php - Parse error: syntax error, unexpected 'mysql_select_db' (T_STRING), expecting ',' or ';' -


i have been looking problem dont know problem be. give error. (parse error: 14 line)

<?php  $conect = mysql_connect('localhost','root') or die('no se pudo conectar: ' . mysql_error());;  $telefono = $_get["telefono"]; $empresa = $_get["empresa"]; $mensaje = $_get["mensaje"]; $codigo = $_get["codigo"]; $remitente = $_get["remitente"]; $tiempo = $_get["tiempo"]; $db = "test_david"; echo "telefono: ".$telefono." empresa: ".$empresa." mensaje: ".$mensaje." codigo: ".$codigo." remitente: ".$remitente." tiempo: ".$tiempo     mysql_select_db($db,$conect) ; or die("no se pudo seleccionar la base de datos");  $update = "insert datos (telefono,empresa,mensaje,codigo,remitente,tiempo) values('".$telefono."','".$empresa."','".$mesaje."','".$codigo."','"$remitente"','"$tiempo"')"; //mysql_close($conect); ?> 

you forget ; character @ end of following line:

echo "telefono: ".$telefono." empresa: ".$empresa." mensaje: ".$mensaje." codigo: ".$codigo." remitente: ".$remitente." tiempo: ".$tiempo    

and aware of xss , sql-injection vulnerableness, should use htmlspecialchars outputting user input , mysql_real_escape_string writing mysql-query!


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -