Jump to content
Fórum Script Brasil
  • 0

não lista os dados no servidor online


MasterllBr

Question

lista os produtos no servidor local normalmente, já no servidor online não lista e também não da nenhum erro.

<a href='?menu=8&buscar=$cat[CODGRP]&produto=$subcat[CODSGR]
'>$subcat[DCRSGR]</a>
<?php

$tbl = mysql_real_escape_string ($_GET['buscar']) && ($_GET['produto']);
$sql = mysql_query("SELECT p.*, c.*, e.* AS tblprecos FROM `tblprodutos` AS p INNER JOIN `tblprecos` AS c ON p.`CODPRD` = c.`CODPRD` INNER JOIN `tblestoque` AS e ON p.`CODPRD` = e.`CODPRD` WHERE CODGRP='$buscar' AND CODSGR='$produto' AND STAATI='S' AND CODTPOETQ='1' ORDER BY DCRPRD DESC limit 18");

    ?>

Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Notice: Undefined variable: buscar in /home/mezzodis/public_html/mzreq/showproductall.php on line 15

Notice: Undefined variable: produto in /home/mezzodis/public_html/mzreq/showproductall.php on line 15
linha 15
$sql = mysql_query("SELECT p.*, c.*, e.* AS tblprecos FROM `tblprodutos` AS p INNER JOIN `tblprecos` AS c ON p.`CODPRD` = c.`CODPRD` INNER JOIN `tblestoque` AS e ON p.`CODPRD` = e.`CODPRD` WHERE CODGRP='$buscar' AND CODSGR='$produto' AND STAATI='S' AND CODTPOETQ='1' ORDER BY DCRPRD DESC limit 18");

Link to post
Share on other sites
  • 0

Você poderia postar o código da página showproductall.php aqui?

De qualquer forma, imprima o conteúdo do GET para saber se está sendo passado os valores correto (adicionar antes de você dar scape nas strings):

print_r($_GET);

Se estiver passando tudo correto, ele irá imprimir os valores na tela.

Link to post
Share on other sites
  • 0

emulei os registers_global e deu certo.

uma vez li que num era seguro fazer isso? procede esta informacao?

<?php
if (!ini_get('register_globals')) {
    $superglobals = array($_SERVER, $_ENV,
        $_FILES, $_COOKIE, $_POST, $_GET);
    if (isset($_SESSION)) {
        array_unshift($superglobals, $_SESSION);
    }
    foreach ($superglobals as $superglobal) {
        extract($superglobal, EXTR_SKIP);
    }
}
?>

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Cloud Computing


  • Forum Statistics

    • Total Topics
      149296
    • Total Posts
      645693
×
×
  • Create New...