Oie
Pessoal agora esta apresentando neste erro:
Notice: Undefined variable: t17cantor in C:\Sites\WbrInternet\sasprod\cdgind_incluir.php on line 15
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '')' at line 1
O codigo a qual o erro se refere e esse !
<? require 'conexao.php';
//Atrubuição dos valores as respectivas variáveis
if (isset($_POST['t17cantor'])){ $tt17cantor = ereg_replace("'","´",$_POST['t17cantor']); }else{ $t17cantor = '';}
if (isset($_POST['tt17cantora'])){ $t17cantora = ereg_replace("'","´",$_POST['t17cantora']); }else{ $t17cantora = '';}
if (isset($_POST['t17casanoturna'])){ $t17casanoturna = ereg_replace("'","´",$_POST['t17casanoturna']); }else{ $t17casanoturna = '';}
if (isset($_POST['t17apoiocultura'])){ $t17apoiocultura = ereg_replace("'","´",$_POST['t17apoiocultura']); }else{ $t17apoiocultura = '';}
if (isset($_POST['t17revelacaoano'])){ $t17revelacaoano = ereg_replace("'","´",$_POST['t17revelacaoano']); }else{ $t17revelacaoano = '';}
if (isset($_POST['t17dj'])){ $t17dj = ereg_replace("'","´",$_POST['t17dj']); }else{ $t17dj = '';}
if (isset($_POST['t17veiculocomunicacao'])){ $t17veiculocomunicacao = ereg_replace("'","´",$_POST['t17veiculocomunicacao']); }else{ $t17veiculocomunicacao = '';}
//Altera os dados na tabela aberta
$sql_query = ("INSERT INTO t17indicacao (t17cantor, t17cantora, t17casanoturna, t17apoiocultura, t17revelacaoano, t17dj, t17veiculocomunicacao) VALUES ('".$t17cantor."','".$t17cantora."','".$t17casanoturna."','".$t17apoiocultura."','".$t17revelacaoano."','".$t17dj."','".$t17veiculocomunicacao."')");
if (!($strQuery = mysql_query($sql_query) or die(mysql_error())))
{
DisplayErrMsg(sprintf("internal error %d:%s\n", mysql_errno(), mysql_error()));
return 0;
}
else
{?>
<script>
window.location.href="sucesso.php";
</script>
<? }?>