Created
March 18, 2017 16:28
-
-
Save zr0n/17a43b2b546411ce9a55bd9a01da41cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ($_POST){ | |
if ($_POST['pesquisar']){ | |
include '../model/banco.php'; | |
$usuario = $_POST['consultar']; | |
$Banco = new Banco(); | |
$resultado = $Banco->consultar($usuario); | |
if ($resultado == true){ | |
for ($i = 0; $i < mysqli_num_rows($resultado); $i++) { | |
$linha = mysqli_fetch_array($resultado); | |
echo "Id_De_Cadastro: ";echo $idade[$i] = $linha['id_cadastro'] . '<br>'; | |
echo "Titulo: "; echo $titulo[$i] = $linha['titulo'] . '<br>'; | |
echo "Categoria: "; echo $categoria[$i] = $linha['categoria'] . '<br>'; | |
echo "Descricao: "; echo $descricao[$i] = $linha['descricao'] . '<br>'; | |
echo "Endereco: "; echo $endereco[$i] = $linha['endereco'] . '<br>'; | |
echo "Telefone: "; echo $telefone[$i] = $linha['telefone'] . '<br>'; | |
echo "Celular: "; echo $celular[$i] = $linha['celular'] . '<br>'; | |
$id_imagem = $_GET[‘id_cadastro’]; | |
$querySelecionaPorCodigo = "SELECT id_cadastro, upload FROM cadastro WHERE codigo = $id_imagem"; | |
$resultado = mysql_query($querySelecionaPorCodigo); | |
$imagem = mysql_fetch_object($resultado); | |
Header( "Location:data:image/jpeg;base64,".base64_encode($imagem->upload)); | |
} | |
} | |
else{ | |
echo 'Nenhum usuário foi encontrado'; | |
} | |
} } | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment