Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $nama = $_POST["nama"];
- $alamat = $_POST["alamat"];
- $username = $_POST["username"];
- $password = $_POST["password"];
- $password2 = $_POST["password2"];
- if ($password == $password2 && $password != '') {
- require_once 'generated/include_dao.php';
- $transaction = new Transaction();
- $user = new User();
- $user->alamat = $alamat;
- $user->nama = $nama;
- $user->password = $password;
- $user->username = $username;
- $user->permission = '9';
- $data = DAOFactory::getUserDAO()->insert($user);
- $transaction->commit();
- if ($data != null) {
- echo "<script language='JavaScript'>document.location='index.php'</script>";
- }
- } else {
- echo "<script language='JavaScript'>document.location='user_add.php'</script>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment