Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("sql.php");
- $hostname = "localhost";
- $user = "root";
- $dbpassword = "";
- $database = "warpweb";
- connect($database,$user,$dbpassword,$hostname);
- $Username = $_POST['RUsername']; //Username
- $Password = $_POST['RPassword']; //Senha
- $Email = $_POST['REmail']; //Email
- if($Username == ''){
- //Se o Username está vazio, volta para o index
- header("Location: ../index.php");
- }else{
- if($Password = ''){
- //Se a senha está vazia, volta pro index
- header("Location: ../index.php");
- }else{
- if($Email == ''){
- //Se o Email está vazio, volta pro index
- header("Location: ../index.php");
- }else{
- $PasswordCrypt = md5($Password);
- mysql_query("INSERT INTO users (Username,Password,Email) VALUES ('$Username','$PasswordCrypt','$Email')") or die(header("Location: ../index.php"));
- header("Location: ../index.php");
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement