Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- siteeee
- ___________________
- <html>
- <head>
- <meta http-equiv="Content-Language" content="pt">
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
- <title>Registo</title>
- </head>
- <body background="back.jpg">
- <p> </p>
- <p> </p>
- <p> </p>
- <p> </p>
- <div style="position: absolute; width: 645px; height: 348px; z-index: 1; left: 319px; top: 199px" id="camada1">
- <p align="center"><font face="SimLLHP" size="6">Formulario de registo</font></p>
- <form method=”post” action=”adiciona.php”>
- <table border="0" width="645">
- <tr>
- <td width="212"><font face="SimLLHP">Nome :</font></td>
- <td align="center" width="423">
- <p align="center"><font face="SimLLHP" color="#FF00FF">
- <input type="text" size="58" name="nome"></font></td>
- </tr>
- <tr>
- <td width="212"><font face="SimLLHP">Telefone :</font></td>
- <td align="center" width="423">
- <p align="center"><font face="SimLLHP" color="#FF00FF">
- <input type="text" size="58" name="Tfl"></font></td>
- </tr>
- <tr>
- <td width="212"><font face="SimLLHP">E-mail :</font></td>
- <td align="center" width="423"><font face="SimLLHP" color="#FF00FF">
- <input type="text" size="58" name="email"></font></td>
- </tr>
- <tr>
- <td width="212"><font face="SimLLHP">Morada :</font></td>
- <td align="center" width="423"><font face="SimLLHP" color="#FF00FF">
- <input type="text" size="58" name="morada"></font></td>
- </tr>
- <tr>
- <td width="212" height="24"> </td>
- <td align="center" height="24" width="423"> </td>
- </tr>
- <tr>
- <td width="212" height="24"><font face="SimLLHP">Username :</font></td>
- <td align="center" height="24" width="423"><font face="SimLLHP" color="#FF00FF">
- <input type="text" size="32" name="username"></font></td>
- </tr>
- <tr>
- <td width="212" height="24"><font face="SimLLHP">Password :</font></td>
- <td align="center" height="24" width="423"><font face="SimLLHP" color="#FF00FF">
- <input type="password" size="32" name="pass1"></font></td>
- </tr>
- <tr>
- <td width="212" height="24"><font face="SimLLHP">Reescreve a
- password :</font></td>
- <td align="center" height="24" width="423"><font face="SimLLHP" color="#FF00FF">
- <input type="password" size="32" name="pass2"></font></td>
- </tr>
- <tr>
- <td width="635" height="21" colspan="2"> </td>
- </tr>
- <tr>
- <td height="31" width="635" colspan="2">
- <p align="center"><input type="submit" name="aceitar" value="Confirmar Registo">
- <input type="reset" value="Cancelar Registo"></span></td>
- </tr>
- </table>
- </form>
- </div>
- </body>
- </html>
- ___________________________
- PHP
- <?php
- if(isset($_POST['nome']) && //COntinua a meter issets por cada valor do form)
- {
- $name=$_POST['nome'];
- $telefone=$_POST['tlf'];
- $mail=$_POST['email'];
- $nick=$_POST['username'];
- $password1=$_POST['pass1'];
- $password2=$_POST['pass2'];
- $conexao=odbc_connect("BD","","");
- $sql="Insert into Clientes (nome, tlf, email, username, pass1) values ('$name','$telefone','$mail','$nick','$password')";
- $resultado=odbc_exec($conexao,$sql);
- if ($resultado)
- echo"Inserido com sucesso";
- else echo "Registo não inserido";
- odbc_free_result($resultado);
- odbc_close($conexao);
- }
- ?>
Add Comment
Please, Sign In to add comment