Hello all,
I'm trying to make a poll, but with the page where I'm trying to insert the data I get an error in line 27 where theer's nothing, in fact this line is outside the script tags
Could you help me on this?, this is my code and thank you all.
<?php
/ Nombre: Insert01.php
Funcion: Inserta primeros valores de la encuesta
/
echo "<body background=logo-it.gif>";
include ("conexion_bd.php");
if($continuar)
{
$conectar = conexion();
//declaracion de variables para SQL
$lock_encuesta = "LOCK TABLES encuesta.datos WRITE";
$unlock_encuesta = "UNLOCK TABLES";
$sql_insert = "INSERT INTO encuesta.datos(id_pregunta, valor) VALUES ('1', '$qst01')";
$sql_update = "UPDATE encuesta.datos SET valor = valor + '$qst01' WHERE encuesta.id_pregunta = '1'";
$query = "SELECT * FROM encuesta.datos WHERE id_pregunta = '1';
mysql_query($lock_encuesta) or die (mysql_error());
mysql_query($sql_update) or die (mysql_error());
mysql_query($unlock_encuesta) or die (mysql_error());
mysql_close($conectar);
exit;
}
php?>