Posted: Fri Sep 29, 2006 4:22 pm
twigletmac | Please use
twigletmac | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
it is not that large I will post it below.
this is my login.phpCode: Select all
<?
include("inc/config.php");
$connection = mysql_connect($hostname, $user, $pass) or die ("Unable to connect!");
$query = "SELECT * FROM clients WHERE name = '{$_POST['name']}' AND password = PASSWORD('{$_POST['password']}')";
$result = mysql_db_query($database, $query, $connection);
if (mysql_num_rows($result) == 1)
{
session_start();
$_session["client_id"] = $client_id;
$_session["client_name"]= $client_name;
$_session["client_email"] = $client_email;
$_session["client_ref"] = $client_ref;
$_session["client_title"] = $client_title;
list($clientid, $name, $pass, $email, $ref, $title) = mysql_fetch_row($result);
header("Location: menu.php");
mysql_free_result ($result);
mysql_close($connection);
}
else
{
mysql_free_result ($result);
mysql_close($connection);
header("Location: index.htm");
exit;
}
?>Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]