UnlimitedMB.comUnlimitedMB.com
Home    |    About Us    |    Forums    |    Signup    |    Login    |    Support
UnlimitedMB.com


 
UnlimitedMB.com




Go Back   UnlimitedMB.com Forums > General Forums > Scripting

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 2 Weeks Ago
arenlor arenlor is offline
Senior Member
 
Join Date: Aug 2006
Location: Jaa, kore da.
Posts: 108
Send a message via ICQ to arenlor Send a message via AIM to arenlor Send a message via MSN to arenlor Send a message via Yahoo to arenlor
Default

Just to answer the question, make a mysql database (or use an existing one) and put a table in it that has username and password.

the code is
$conn = mysql_connect('mysql','username','password');
$db = mysql_select_db('databasename');
$username = $_POST['username'];
$password = $_POST['password'];
if($password != '' && $username != '')
{
$query = "select * from TABLENAME where username = '$username' and password = '$password'";
$result = mysql_query("$query");
$num = mysql_num_rows("$result");
if($num == 1)
{
whatever you want it to do such as header("location:file");
}
}
else
{
echo "





";
}
?>

note where I put text|password you need to choose one.
__________________
FAQ
Reply With Quote
 

« Previous Thread | Next Thread »

Thread Tools Search this Thread
Show Printable Version Show Printable Version
Email this Page Email this Page
Search this Thread:

Advanced Search
Display Modes
Linear Mode Switch to Linear Mode
Hybrid Mode Switch to Hybrid Mode
Threaded Mode Threaded Mode

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT. The time now is 07:24 AM.


Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2006, Jelsoft Enterprises Ltd.









 



UnlimitedMB.com © 2006
Terms of Use | Report Abuse