| |
Forum PHP IndonesiaDapatkan pertolongan pertama pada kebingungan PHP dan sekitarnya |
|
|
|
|
|
| |
|
|
All times are GMT + 7 Hours
|
|
MEMASTIKAN SESSION LANCAR
 |
Fri Jan 29, 2010 21:36 |
 |
Author |
Message |
mursidaccess PHPuser

Joined: 09 Jan 2010 Posts: 25 Location: http://mursid.web.id
|
| Post subject: MEMASTIKAN SESSION LANCAR |
|
|
Temans2..
aku ada masalah nih, ngomong2 aku sudah buat aplikasi php yang pake loin dan logout..dan saya test di localhost komputerku berjalan lancar..
tapi setelah aplikasi itu aku copy ke komputer lain (bc: selain komputerku), bahkan ketika saya upload di hosting koq sessionnya kayak gak jalan ya?
jadi ketika saya mau login di komputer selain punyaku itu selalu saja jawabannya "login gagal! username tidak terdaftar"
padahal saya cek databasenya lengkap..script juga sama kayak di komputerku,
yang pengen tak tanyakan, gimana caranya biar proses login dan logout itu bisa berjalan lancara biarpun dipindah tempat kemana saja?? istilahnya cara biar fixed gitu..
terima kasih sebelumnya kawan.. _________________ http://mursid.web.id
The Power of DeadLine! |
|
| |
|
|
 |
Sat Jan 30, 2010 04:16 |
 |
Author |
Message |
RoNz Jagoan PHP


Joined: 13 Apr 2009 Posts: 485 Location: Kerinci
|
| Post subject: |
|
|
Sessionnya dibikin gmn mas? Mohon paste potongan scriptnya. :D
Usernamenya diambil dari database? Jika ya, apakah tabel user pada komputer lain udah berisi user yg akan login? _________________ .: FeeLCoMz Community :. |
|
| |
|
|
 |
Sun Feb 07, 2010 22:28 |
 |
Author |
Message |
mursidaccess PHPuser

Joined: 09 Jan 2010 Posts: 25 Location: http://mursid.web.id
|
| Post subject: |
|
|
ini bro script proses loginnya..mohon dikoreksi
| Code: | <?php <?php
session_start();
include_once "librari/inc.koneksi.php";
if ($_POST['TbLogin']) {
$TxtUserID = $_POST['TxtUserID'];
$TxtPassID = $_POST['TxtPassID'];
if (trim($TxtUserID)=="") {
$pesan[] = "Data User Name kosong";
}
if (trim($TxtPassID)=="") {
$pesan[] = "Data Password kosong";
}
$sql_cek = "SELECT * FROM pelanggan WHERE userID='$TxtUserID'
AND passID=PASSWORD('$TxtPassID')";
$qry_cek = mysql_query($sql_cek, $koneksi) or die ("Gagal Cek");
$ada_cek = mysql_num_rows($qry_cek);
$hls_cek = mysql_fetch_array($qry_cek);
if ($ada_cek >=1) {
$SES_USERPLG = $TxtUserID;
session_register("SES_USERPLG");
$SES_UIDPLG = $hls_cek['uid_plg'];
session_register("SES_UIDPLG");
$sql_del = "DELETE FROM keranjang WHERE uid_plg='$hls_cek[uid_plg]'";
mysql_query($sql_del) or die ("Gagal hapus".mysql_error());
echo "<meta http-equiv='refresh' content='0; url=index.php'>";
echo "<script langguage=JavaScript>
alert('Login Sukses. SELAMAT DATANG di halaman pelanggan!')
window.location='index.php';
</script>";
exit;
}
else {
$pesan[] = "User dan Password belum benar";
}
if (! count($pesan)==0 ) {
$TxtUserID = $_POST['TxtUserID'];
echo "<br><br>";
echo "<div align='left'>";
echo " <b> Kesalahan Input : </b><br>";
foreach ($pesan as $indeks=>$pesan_tampil) {
$urut_pesan++;
echo "<font color='#FF0000'>";
echo " ";
echo "$urut_pesan . $pesan_tampil <br>";
echo "</font>";
}
echo "</div><br>";
}
}
?> ?> |
_________________ http://mursid.web.id
The Power of DeadLine! |
|
| |
|
|
 |
Tue Mar 02, 2010 13:01 |
 |
Author |
Message |
RoNz Jagoan PHP


Joined: 13 Apr 2009 Posts: 485 Location: Kerinci
|
| Post subject: |
|
|
lho, pesan yg ininya mana mas? "login gagal! username tidak terdaftar" _________________ .: FeeLCoMz Community :. |
|
| |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
|
|
|
Powered by phpBB © 2001, 2002 phpBB Group
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|