o problema eh que na parte do
"INSERT INTO ".$dbescolha." SET
ele naum encontra a variavel.....
teria q por d otro jeito , mas ja tentei varios.... quais os possiveis jeitos de por uma variavel??
			
		- Fórum WMO
- → Viewing Profile: Posts: cnitrous
Community Stats
- Group Usuários
- Active Posts 10
- Profile Views 1244
- Member Title Novato no fórum
- Age Age Unknown
- Birthday Birthday Unknown
- 
													Sexo
 Não informado Não informado
								
										0
										
											Neutral
										
										
									
								
								User Tools
Friends
cnitrous hasn't added any friends yet.
Latest Visitors
- 
												
													 Guest Guest
 04/11/2007, 03:02
Posts I've Made
In Topic: Problemas Mysql Php
12/03/2005, 18:49
In Topic: Problemas Mysql Php
12/03/2005, 18:40
				Erro ao adicionar a notícia 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 'SET titulo='vfvfdvfdvfd', conteudo='vdfvdfvdfv'
			
		In Topic: Iniciando no mySQL
04/03/2005, 01:50
				Olá,
sou meio novato,, to a um mes aprendendo,,,, e queria fzer uma pagina de
PESQUISA...
OLHEM O Q FIZ,,, o problema eh q ele sempre fala q naum entrei com detalhes..
bem, olhem ai,, fiz enquanto estudava o livro "PHP E MYSQL: DESENVOLVIMENTO WEB"
PESQUISA.HTM
e o
resultado.php
por favor me ajudem a terminar,, obrigado!!! 
			
		sou meio novato,, to a um mes aprendendo,,,, e queria fzer uma pagina de
PESQUISA...
OLHEM O Q FIZ,,, o problema eh q ele sempre fala q naum entrei com detalhes..
bem, olhem ai,, fiz enquanto estudava o livro "PHP E MYSQL: DESENVOLVIMENTO WEB"
PESQUISA.HTM
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Pesquisa</title> </head> <body> <form action="resultado.php" method="post"> <select name="procuratipo"> <option value="nome" selected>nome <option value="email" selected>email <option value="idade" selected>idade <option value="cidade" selected>cidade <option value="data" selected>data </select> <Br> Pavavra chave <input name"termo" type="text"> <input type="submit" value="vai!"> </form> </body> </html>
e o
resultado.php
<?php
//***************************************************************************************
$nome = $_POST['nome'];
$email = $_POST['email'];
$idade = $_POST['idade'];
$cidade = $_POST['cidade'];
$data = $_POST['data'];
$termo = $_POST['termo'];
$procuratipo = $_POST['procuratipo'];
//***************************************************************************************
trim($termo);
if (!$procuratipo || !$termo)
{
echo "voce nao entrou com detalhes. por favor tente novamente!";
exit;
}
$procuratipo = addslashes($procuratipo);
$termo = addslashes($termo);
//#####
include"config.php";
//#####
$query = "select * from cadastro where ".$procuratipo." like  '%".$termo."%'";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
echo "<p> Numeros de cadastros encontrados: ".$num_results."</p>";
for ($i=0; $i > $num_results; $i++)
{
$row = mysql_fetch_array($result);
echo "<p><strong>".($i+1)." Nome: ";
echo htmlspecialchars( stripslashes($row['nome']));
echo "</strong><br> Email: ";
echo htmlspecialchars( stripslashes($row['email']));
echo "<br> Idade: ";
echo htmlspecialchars( stripslashes($row['idade']));
echo "<br>  Cidade: ";
echo htmlspecialchars( stripslashes($row['cidade']));
echo "<br>  Data: ";
echo htmlspecialchars( stripslashes($row['data']));
echo "</p>";
}
?>
por favor me ajudem a terminar,, obrigado!!!
 
			- Fórum WMO
- → Viewing Profile: Posts: cnitrous
- Privacy Policy
- Regras ·


 
			
 Postagens
    Postagens
