Reseller Domain Murah dan termurah di Indonesia? ya di ResellerCamp.
         
 

Forum PHP Indonesia

 
Advanced Search
   
 
Home Register FAQ Memberlist Usergroups  
 
 

Forum PHP Indonesia Forum Index Instalasi PHP login php
Display posts from previous:   
      All times are GMT + 7 Hours  

login php

Post new topic  Reply to topic

Mon Mar 08, 2010 12:23
Author Message
rifkey
Anak Baru
Anak Baru


Joined: 08 Mar 2010
Posts: 1

Post subject: login php Reply with quote

tolong saya gmn cara buat login php & mysql........... hail
 
View user's profile Send private message Send e-mail Yahoo Messenger
      Back To Top  

Mon Mar 08, 2010 21:29
Author Message
arijulianto
PHP Programmer
PHP Programmer


Joined: 12 Apr 2009
Posts: 117
Location: Indonesia

Post subject: Reply with quote

udah banyak kali posting yang ngebahas masalah login logout dengan php mysql,,,,
coba cek di posting2 terutama di topik PHP Help ama MySQL Help
 
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
      Back To Top  

Mon May 10, 2010 13:56
Author Message
andrydata
PHPnewbie
PHPnewbie


Joined: 07 May 2010
Posts: 12
Location: jakarta

Post subject: form menu login php Reply with quote

Untuk Form loginnya bisa seperti ini


Quote:
<form method="post" action="loginsubmit.php">
<table border="0">
<tr>
<td>Masukkan Username </td>
<td><input name="username" type="text"></td>
</tr>
<tr>
<td>Masukkan Password </td>
<td><input name="pass" type="password"></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="Submit"></td>
</tr>
</table>
</form>


setelah itu kita buat file loginsubmit.php

Code:
<?php // menjalankan session
session_start();
 
$username $_POST['username'];
$password $_POST['pass'];
 
mysql_connect("namahost""dbuser""dbpass");
mysql_select_db("dbname");
 

$query "SELECT * FROM nama_table WHERE username = '$username'";
$hasil mysql_query($query) or die("Error");
$data  mysql_fetch_array($hasil);

if (
$username == $data['username'])
{
    
// jika sesuai, maka buat session untuk username
    
$_SESSION['username'] = $username;
 
    
// menampilkan menu ke halaman akses
    
echo "<h2>Login sukses</h2>";

}
else echo 
"<h2>Login Gagal</h2>"?>
I Love U
_________________
http://marketplace.bizweb.co.id
 
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
      Back To Top  

Fri Jul 16, 2010 23:40
Author Message
musicanda
PHP Master
PHP Master


Joined: 02 Jun 2010
Posts: 263
Location: Rumahnya Angeline

Post subject: Reply with quote

http://www.forumphp.web.id/viewforum.php?f=1

cek di situ mas... Big Smile
 
View user's profile Send private message Send e-mail Visit poster's website
      Back To Top  
Post new topic  Reply to topic

 
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


      Back To Top  

Page 1 of 1
Jump to:  
Powered by phpBB © 2001, 2002 phpBB Group
Toko Kaos Couple | Avalanche style by What Is Real © 2004 | Toko Baju Butik Online | Cara Pedia | Busana Baju Muslim