Jump to content


Photo

Erro Undefined Variable


  • Faça o login para participar
2 replies to this topic

#1 patyreis

patyreis

    Novato no fórum

  • Usuários
  • 2 posts
  • Sexo:Feminino
  • Localidade:Rio de Janeiro

Posted 07/12/2011, 18:13

( ! ) Notice: Undefined index: pageNum_RsProdutosInicial in C:\wamp\www\lojavirtual\produtos_inicial.php on line 141
Call Stack
# Time Memory Function Location
1 0.0014 399936 {main}( ) ..\index.php:0
2 0.0611 1542736 require( 'C:\wamp\www\lojavirtual\produtos_inicial.php' ) ..\index.php:65

( ! ) Notice: Undefined index: pageNum_RsProdutosInicial in C:\wamp\www\lojavirtual\produtos_inicial.php on line 146
Call Stack
# Time Memory Function Location
1 0.0014 399936 {main}( ) ..\index.php:0
2 0.0611 1542736 require( 'C:\wamp\www\lojavirtual\produtos_inicial.php' ) ..\index.php:65
1 |
( ! ) Notice: Undefined index: pageNum_RsProdutosInicial in C:\wamp\www\lojavirtual\produtos_inicial.php on line 151
Call Stack
# Time Memory Function Location
1 0.0014 399936 {main}( ) ..\index.php:0
2 0.0611 1542736 require( 'C:\wamp\www\lojavirtual\produtos_inicial.php' ) ..\index.php:65

( ! ) Notice: Undefined index: pageNum_RsProdutosInicial in C:\wamp\www\lojavirtual\produtos_inicial.php on line 155
Call Stack
# Time Memory Function Location
1 0.0014 399936 {main}( ) ..\index.php:0
2 0.0611 1542736 require( 'C:\wamp\www\lojavirtual\produtos_inicial.php' ) ..\index.php:65


-------------------------------------------------------------------------------------------------------------------------------------------------------


<td>
<?php if($_GET["pageNum_RsProdutosInicial"] > 0) { ?>
<a href="<?php printf("%s?pageNum_RsProdutosInicial=%d%s", $currentPage, max(0, $pageNum_RsProdutosInicial - 2), $queryString_RsProdutosInicial); ?>">
<?php echo $pageNum_RsProdutosInicial - 1; ?>
</a> |
<?php } ?>
<?php if($_GET['pageNum_RsProdutosInicial'] > 0) { ?>
<a href="<?php printf("%s?pageNum_RsProdutosInicial=%d%s", $currentPage, max(0, $pageNum_RsProdutosInicial - 1), $queryString_RsProdutosInicial); ?>">
<?php echo $pageNum_RsProdutosInicial; ?></a> |
<?php } ?>
<strong><?php echo $pageNum_RsProdutosInicial + 1; ?></strong> |
<?php if($_GET['pageNum_RsProdutosInicial'] + 2 <= ceil($totalRows_RsProdutosInicial / $maxRows_RsProdutosInicial)) { ?>
<a href="<?php printf("%s?pageNum_RsProdutosInicial=%d%s", $currentPage, min($totalPages_RsProdutosInicial, $pageNum_RsProdutosInicial + 1), $queryString_RsProdutosInicial); ?>">
<?php echo $pageNum_RsProdutosInicial + 2; ?></a> |
<?php } ?>
<?php if($_GET['pageNum_RsProdutosInicial'] + 3 <= ceil($totalRows_RsProdutosInicial / $maxRows_RsProdutosInicial)) { ?>
<a href="<?php printf("%s?pageNum_RsProdutosInicial=%d%s", $currentPage, min($totalPages_RsProdutosInicial, $pageNum_RsProdutosInicial + 2), $queryString_RsProdutosInicial); ?>">
<?php echo $pageNum_RsProdutosInicial + 3; ?></a>
<?php } ?>
</td>

#2 DC_Switch

DC_Switch

    Novato no fórum

  • Usuários
  • 17 posts
  • Sexo:Masculino
  • Localidade:Logo Ali

Posted 07/12/2011, 18:40

vc tem que defini a variavel pageNum_RsProdutosInicial
faz assim
<?php if($_GET["pageNum_RsProdutosInicial"] > 0) {
$pageNum_RsProdutosInicial = $_GET['pageNum_RsProdutosInicial'];
?>

Edição feita por: DC_Switch, 07/12/2011, 18:41.


#3 Goku Jr

Goku Jr

    Nilson

  • Usuários
  • 3757 posts
  • Sexo:Masculino

Posted 08/12/2011, 19:26

Isso não e mensagem de erro, e apenas "noticia" informando que a váriavel não foi definida antes.

você pode ocultar esta mensagem pelo PHP.INI ou fazer como DC_Switch disse.
-----------------------------------------------------------------------
PALMEIRAS - Primeiro campeão do mundo em 1951




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq