Ir para conteúdo
Fórum Script Brasil
  • 0

Busca em php


Ana Gabriela Raitz

Pergunta

Boa tarde a todos, estou com dificuldades em fazer uma busca em php retornar os valores.

Tenho a tela de busca onde informo o dado que quero buscar, o codigo é:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Objetos que passaram pelo satelite</title>
<style type="text/css">
<!--
.dados {
    color: #1866E7;
    font-size: 24px;
}
-->
</style></head>

<body>
<form action="resultado_objetosat.php" method="get" name="form1" id="form1">
  <table width="700" border="0">
    <tr></tr>
    <tr></tr>
    <tr>
      <td width="400" class="dados">Digite o nome do Satélite:</td>
      <td width="361"><label>
        <input type="text" name="buscaob" id="buscaob" />
      </label></td>
      <td width="226"><label>
        <input name="Submit" type="submit" id="Submit" value="Buscar no site" />
      </label></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
</form>
</body>
</html>
E minha pagina de resultado que não retorna nada é:
<?php require_once('Connections/ConnCatalogo.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$buscaob_rs_buscaobjeto = "-1";
if (isset($_GET['buscaob'])) {
  $buscaob_rs_buscaobjeto = $_GET['buscaob'];
}
mysql_select_db($database_ConnCatalogo, $ConnCatalogo);
$rs_buscaobjeto = mysql_query("SELECT passagem.objeto, passagem.dia_pass, passagem.mes_pass, passagem.ano_pass FROM passagem WHERE passagem.nome like '%buscaob_rs_buscaobjeto%' ORDER BY passagem.nome") or die(mysql_error());
$row_rs_buscaobjeto = mysql_fetch_assoc($rs_buscaobjeto);
$totalRows_rs_buscaobjeto = mysql_num_rows($rs_buscaobjeto);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sem título</title>
<style type="text/css">
<!--
.impressao {
    font-size: 16px;
    color: #0CC;
}
.impressao a strong {
    color: #00F;
    font-size: 24px;
}
.Titulo {
    font-family: "Arial Black", Gadget, sans-serif;
    font-size: 36px;
    color: #00F;
    text-align: left;
}
.dados {
    color: #1866E7;
    font-size: 24px;
}
-->
</style></head>

<body>
<form id="form1" name="form1" method="post" action="">
  <p class="Titulo">Lista Objetos</p>
  <table width="883" border%3

Editado por quintelab
Removido Caixa Alta do título e adicionado BBCode Code
Link para o comentário
Compartilhar em outros sites

1 resposta a esta questão

Posts Recomendados

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,8k
×
×
  • Criar Novo...