Ola,
Não desenvolvo muito em PHP,
mas preciso de uma ajuda,
Preciso fazer uma busca pelo nome de usuario e verificar quantas horas de banco ele tem...
Ja fiz uma base, so falta a conexao com o banco e a comparação.
Se alguem poder me ajudar agradeço.
------------------------------------------------------------------------------------------------ ---
------------------------------------------------------------------------------------------------ ---
<?php
$usuario = "sa";
$senha = "senha";
$banco_de_dados = "JKADM";
mssql_connect("172.16.100.7",$usuario,$senha) or die("Erro ao conectar no banco de dados");
mssql_select_db($banco_de_dados) or die("Erro ao selecionar o banco de dados");
include "../config/validar_session.php";
include "../config/sistema.php";
// faz consulta no banco
$consulta = mysql_query("select * from tbl_Log where strOS = '$login_usuario'");
?>
<!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=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form action="atualizar_dados.php" method="post" enctype="multipart/form-data" name="formatualizar">
<table
style="background-color: rgb(255, 255, 255); width: 806px; height: 32px; text-align: left; margin-left: auto; margin-right: auto;"
border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="background-color: rgb(255, 255, 255);"><small><span
style="font-weight: bold; font-family: verdana;"></span></small>
<table
style="text-align: left; background-color: rgb(0, 153, 0); width: 400px; height: 17px;"
border="0" cellpadding="1" cellspacing="1">
<tbody>
<tr>
<td style="background-color: rgb(0, 153, 0);"><small
style="font-weight: bold; color: rgb(250, 250, 250);"><span
<div style="text-align: center;"><big><small
style="font-family: Verdana;">BANCO DE HORAS</span></small></td>
</tr>
</tbody>
</table>
<small><br style="font-family: Verdana;">
</small>
<div style="text-align: left;"><small
style="color: rgb(255, 0, 0);"><small><span
style="font-family: Verdana;">
</span></small></small></div>
<small><span style="font-family: Verdana;"
yle="mylabelstyle">Nome :
</span><input size="47"
style="font-family: Verdana;" class="myinputstyle"
name="nome" value="<?php echo $nome ?>"><br style="font-family: Verdana;"> <br>
<span style="font-family: Verdana;">Horas de Banco:
</span><input size="38"
style="font-family: Verdana;" class="myinputstyle"
<br>
</small></span></small><small><span
style="font-family: Verdana;"></span></small>
<div style="text-align: left justify;"><big><small
style="color: rgb(255, 0, 0);"><small><span
style="font-family: Verdana;"></span></small></small><br>
<small style="color: rgb(255, 0, 0);"><small><span
style="font-family: Verdana;"></span></small></small></big></div>
<big> </big>
<div style="text-align: left justify;"><big><input
style="" class="botao" name="atualizar"
value="Buscar" id="atualizar" type="submit"><input style=""
class="botao" name="reset" value="Nova Busca"
type="reset"></big></div>
<big> </big></td>
</tr>
</tbody>
</table>
<br>
</form>
</body>
</html>