. Regisys include "koneksi.php"; if(!empty($_POST['username']) && !empty($_POST['password'])){ $username = mysql_real_escape_string($_POST['username']); $password = md5(mysql_real_escape_string($_POST['password'])); $checkuserexist=mysql_query("select * from user where username='".$username."'"); if(mysql_num_rows($checkuserexist) != 0){ $_SESSION['username'] = $username; $_SESSION['password'] = $password; echo "This username has been taken, please try again"; }elseif(mysql_num_rows($checkuserexist) == 0 ){ $submituser = mysql_query("insert into user (username,password) values ('".$username."','".$password."')"); if($submituser){ echo "Register suceed"; } }else{ echo "There is an error, please try again"; } }else { ?> Reg. Form Enter Your ID Username Password } ?> .
tunjukin hasilnya juga om
ReplyDelete