hadi.yn.lt
LOG IN
$enc_pass1 =md5(sha1(md5( $up_ password1 ))); $enc_pass2 =md5(sha1(md5( $up_ password2 ))); //Mencocokan Password if ($enc_pass1 != $enc_pass2 ){ $up_error_msg = 'Password Tidak Cocok.' ; } else{ //Proses Input data di 2 table $go1 =mysql_query( "INSERT INTO user VALUE ('', '$up_username', '$ enc_pass1')" ); $id_user =mysql_insert_id(); //Ambil id user secara langsung $go2 =mysql_query( "INSERT INTO biodata (id_user,nama,email,reg_ date) VALUE ('$id_user','$up_name','$ up_email',NOW())" ); //membuat session $_SESSION ['chat_i_id' ]= $id_user ; //melempar ke halaman lain header( 'Location: home.php' ); exit; } } } } } } //Proses Sign-IN/Login/Masuk elseif($_POST [ 'sign-in' ]){ //sesuai nama button submit pada form sign- in //Mengambil value dari form.. $in_username =htmlentities(mysql_ real_escape_string( $_POST [ 'in- username' ])); $in_password =htmlentities(mysql_ real_escape_string( $_POST [ 'in- password'])); //Cek data kosong. if (! $in_username ){ $in_error_ msg= 'Username Kosong.' ;} elseif(! $in_password ){ $in_error_ msg= 'Password Kosong.' ;} else{ $enc_pass =md5(sha1(md5( $in_ password))); //Proses Encripsi password. samakan struktur encripsi dengan encripsi pada saat register. saya menggunkan md5->sha1->md5. //Proses Sign-IN $sign_qry =mysql_query( "SELECT id_ user FROM user WHERE username='$ in_username' AND password='$enc_ pass'" ); //mencocokan data Username dan Password $num_rows =mysql_num_rows( $sign_ qry ); //Cek jumlah data yang di temukan. if ($num_rows !=1){ //Memastikan jumlah data yang ditemukan hanya 1 user, jika 1 orang maka akan dinyatakan bahya data sudah valid. $in_error_msg ='Terjadi tidak kecocokan antara Username dan Password'; }else { //COCOK //ambil id user $data_user =mysql_fetch_assoc( $sign_ qry ); $id_user =$data_user [ 'id_user' ]; //membuat session $_SESSION ['chat_i_id' ]= $id_user ; //melempar ke halaman lain header( 'Location: home.php' ); } } } //Memasukan File header include_once 'index_header.php' ; ?>

Simple Messanging System [SMS]

Membuat Simple Messanging system..

Sign- In

' ;echo $in_ error_msg ; echo'
' ;}?>

Sign-Up

' ;echo $ up_error_msg ; echo'
' ;}?>
Duck hunt

login


MusicVideoimage game
_footer
Mau dollar gratis klik disini

09 Counter :
12 Follow : 12
13 kunjungan : 262
icon_14 harian : 1
icon_15 Bulanan : 1
icon_16 Tahunan : 1
TOP-
RATING
C-STAT
U-ON

on Online
by : 20150214102300 1 hadisofian
TONOK COMUNITY
Copyright © 2013-2024
by : WAPMASTER