Proses-daftar.php Updatejumlah.php Proses-login.php Logout.php

div class=footer div class=container pCopyright by copy Chris Noel 2016p div div -- footer --

9. Proses-daftar.php

?php ifisset_POST[tambah]{ includeproseskoneksi.php; username = _POST[username]; password = _POST[password]; email = _POST[email]; nama = _POST[nama]; nomor = _POST[no_telepon]; kota = _POST[kota]; alamat = _POST[alamat]; input = mysql_queryINSERT INTO member values ,username,password,email,nama,nomor,kota ,alamat or diemysql_error; ifinput{ echo scriptalertBerhasil Mendaftarscript; echo meta http-equiv=refresh content=1 url=registration.php; }else{ echo scriptalertGagal Mendaftarscript; } }else{ jika tidak terdeteksi tombol tambah di klik redirect atau dikembalikan ke halaman tambah echo scriptwindow.history.backscript; } ?

10. Updatejumlah.php

?php include config.php; mysql_connectHOST,USER_NAME,PASSWORD or dietidak bisa koneksi ke database; mysql_select_dbDB; id = _GET[id]; jml = _GET[jml]; harga = mysql_queryselect produk.harga from produk, keranjang where produk.id_produk=keranjang.id_produk and keranjang.id_belanja=id; h = mysql_fetch_arrayharga; harganya = h[harga]; hargabaru = harganyajml; update = mysql_queryupdate keranjang set jumlah=jml, harga=hargabaru where id_belanja=id; ifupdate{ ambil = mysql_queryselect harga from keranjang where id_belanja=id; a = mysql_fetch_arrayambil; echo a[harga]; }else{ echo error; } ?

11. Proses-login.php

?php include proseskoneksi.php; username = _POST[username]; password = _POST[password]; if emptyusername{ echo scriptalertUsername belum diisiscript; echo meta http-equiv=refresh content=1 url=registration.php; }else if emptypassword{ echo scriptalertPassword belum diisiscript; echo meta http-equiv=refresh content=1 url=registration.php; }else{ session_start; login = mysql_queryselect from member where username=username and password=password; if mysql_num_rowslogin 0{ _SESSION[username] = username; headerlocation:index1.php; }else{ echo scriptalertUsername atau Password salahscript; echo meta http-equiv=refresh content=1 url=registration.php; } } ?

12. Logout.php

?php session_start; session_destroy; headerlocation:index.php; ?

13. Cara Order.php