<?php
//????? -esta dando pau
$txtCodLivro = trim($txtCodLivro);
$txtCodCat = trim($txtCodCat);
$txtTitulo = trim($txtTitulo);
$txtAutor = trim($txtAutor);
$txtNPaginas = trim($txtNPaginas);
$txtFormato = trim($txtFormato);
$txtPreco = trim($txtPreco);
$txtResenha = trim($txtResenha);
$txtCapa = trim($txtCapa);
$txtDtLanc = trim($txtAno) + trim($txtMes) + trim($txtDia);
//abre conexao (abreconexao.inc nao funcionou coloquei .php)
include "abreconexao.php";
//cria sentença sql de inclusao
$sqlINS = "insert into livros ";
$sqlINS = $sqlINS . "(codLivro, codCat, titulo, autor, npaginas, formato, preco, resenha, dtLanc, capa) ";
$sqlINS = $sqlINS . "values ('$txtCodLivro', ";
$sqlINS = $sqlINS . "'$txtCodCat', ";
$sqlINS = $sqlINS . "'$txtTitulo', ";
$sqlINS = $sqlINS . "'$txtAutor', ";
$sqlINS = $sqlINS . "'$txtNPaginas', ";
$sqlINS = $sqlINS . "'$txtFormato', ";
$sqlINS = $sqlINS . "'$txtPreco', ";
$sqlINS = $sqlINS . "'$txtResenha', ";
$sqlINS = $sqlINS . "'$txtDtLanc', ";
$sqlINS = $sqlINS . "'$txtCapa')";
//carrega registros selecionados
$rs = mysql_query($sqlINS, $conexao) or die ("nao conseguiu executar instrução INSERT");
$numRegistros = mysql_num_rows($rs)
?>
o livro <?php echo $txtTitulo; ?> foi incluido com sucesso<br><br>
<a href="cap10lab11.htm">clique para inserir novo livro</a>
<?php
mysql_close($conexao);
?>
e apresenta este erro:
Notice: Undefined variable: txtCodLivro in C:\serieweb\php\cap10lab11.php on line 4
Notice: Undefined variable: txtCodCat in C:\serieweb\php\cap10lab11.php on line 5
Notice: Undefined variable: txtTitulo in C:\serieweb\php\cap10lab11.php on line 6
Notice: Undefined variable: txtAutor in C:\serieweb\php\cap10lab11.php on line 7
Notice: Undefined variable: txtNPaginas in C:\serieweb\php\cap10lab11.php on line 8
Notice: Undefined variable: txtFormato in C:\serieweb\php\cap10lab11.php on line 9
Notice: Undefined variable: txtPreco in C:\serieweb\php\cap10lab11.php on line 10
Notice: Undefined variable: txtResenha in C:\serieweb\php\cap10lab11.php on line 11
Notice: Undefined variable: txtCapa in C:\serieweb\php\cap10lab11.php on line 12
Notice: Undefined variable: txtAno in C:\serieweb\php\cap10lab11.php on line 13
Notice: Undefined variable: txtMes in C:\serieweb\php\cap10lab11.php on line 13
Notice: Undefined variable: txtDia in C:\serieweb\php\cap10lab11.php on line 13
nao conseguiu executar instrução INSERT
alguem pode dizer como resolver?