Ok people that's the code :
<?
if((!$Username) | (!$Password)) {
print ("Please Enter In THe Correct Name");
}
mysql_connect("localhost","User_Name_here","Password_Here");
mysql_select_db("My_Database_Here");
This part is sort if ya want to. I would suggest it.
Make your login page have the main value of Password
#Comment Out if you Want too
$Password = md5($Password);
$sql = "select * from My_Table where Password=$Password and Username=$Username";
$result = mysql_query($sql);
$num = mysql_numrows($result);
If Login Is Okay Do What You Want TO DO to Them
if ($num == "1") {
print ("Logged in okay");
#Or you can send them somwhere nice like hawaii
header("Location: http://www.hawii");
exit;
or even fetch feild about them or save sessions
session_start();
session_register(Username);
}
And we must a have a default error message if login fails
if ($num == "0"){
print ("Sorry Bub You Need Some Manners In Password");
}
?>
How put to him after check the username and password , insert into the HEADER are some html page that i put into another array .
Like this :
Mysql Config.
Database : Extranet
Fields 4
Username
Password
Area
Page
Let say then a user enter in my page and put:
username: carlos
password: blablabla
(enter)
The mysql check the username and pass and then using the "Page" field sent into the HEADER area of the above script the page the i put into there.
I know that is in this area :
$sql = "select * from My_Table where Password=$Password and Username=$Username";
But how make he takes the what i fill in the field "Page" and put into the HEADER ?
How make take the "Area"field and put into here too :
session_start();
session_register(Username); <- In script has Username i need put Area .
I not really good in php or even Mysql , but in really trying hard here to figure out how make this work .
Can someone help here ??
Thanks Anyway .