Code: Select all
<?php
require "header.php";
?>
<tr>
<td width="100%" bgcolor="<?php print $the_contentbgcolor; ?>">
<?php
echo "<font face="$the_font" size="$the_size1"><a href="./index.php">$set_title</a> --> $lang_login</font>";
?><center><br>
<form action="loginl.php" method="POST">
<table border="0" width="<?php print $the_contentwidth; ?>" cellspacing="<?php print $the_bordersize; ?>" cellpadding="<?php print $the_cellspacing; ?>" bgcolor="<?php print $the_bordercolor; ?>">
<?php
echo"<tr>
<td width="100%" background="./images/$the_bckgrndcat" bgcolor="$the_topcolor" align="left" colspan="2"><font face="$the_font" size="$the_size1" color="$the_toptextcolor"><b>$lang_login</b></font></td>
</tr>
<tr>
<td width="50%" bgcolor="$the_altcolor1" align="left"><font face="$the_font" size="$the_size2"><b>$lang_username</b></font></td>
<td width="50%" bgcolor="$the_altcolor2" align="left"><input type="text" name="username"></td>
</tr>
<tr>
<td width="50%" bgcolor="$the_altcolor1" align="left"><font face="$the_font" size="$the_size2"><b>$lang_password</b></font></td>
<td width="50%" bgcolor="$the_altcolor2" align="left"><input type="password" name="password"></td>
</tr>
<tr>
<td width="100%" bgcolor="$the_altcolor1" align="center" colspan="2"><input type="submit" value="Log Into Account"></td>
</tr>";
?>
</table>
</form>
<br>
</center></td>
</tr>
</table>
<?php
require "footer.php";
?>Code: Select all
<?php
require "header.php";
?>
<tr>
<td width="100%" bgcolor="<?php print $the_contentbgcolor; ?>">
<center><br>
<table border="0" width="<?php print $the_contentwidth; ?>" cellspacing="<?php print $the_bordersize; ?>" cellpadding="<?php print $the_cellspacing; ?>" bgcolor="<?php print $the_bordercolor; ?>">
<?php
if ((!$_POST[username]) || (!$_POST[password])) {
echo"<tr>
<td width="100%" background="./images/$the_bckgrndcat" bgcolor="$the_topcolor" align="left"><font face="$the_font" size="$the_size1" color="$the_toptextcolor"><b>$lang_login</b></font></td>
</tr>
<tr valign="top">
<td width="100%" bgcolor="$the_altcolor1" align="left"><font face="$the_font" size="$the_size2">$lang_login_forms</font></td>
</tr>";
exit;
}
$sql = "SELECT username, password FROM df_users WHERE username = '$_POST[username]' AND password = password('$_POST[password]')";
$result = mysql_query($sql,$conn) or die(mysql_error());
if (mysql_num_rows($result) == 1) {
$username = mysql_result($result, 0, 'username');
setcookie("dforum", "1", time()+3600, "/", "/", 0);
session_start();
$_SESSION[username] = "$username";
echo "<tr>
<td width="100%" background="./images/$the_bckgrndcat" bgcolor="$the_topcolor" align="left"><font face="$the_font" size="$the_size1" color="$the_toptextcolor"><b>$lang_login</b></font></td>
</tr>
<tr valign="top">
<td width="100%" bgcolor="$the_altcolor1" align="left"><font face="$the_font" size="$the_size2">$lang_login_yes</font></td>
</tr>";
} else {
echo "<tr>
<td width="100%" background="./images/$the_bckgrndcat" bgcolor="$the_topcolor" align="left"><font face="$the_font" size="$the_size1" color="$the_toptextcolor"><b>$lang_login</b></font></td>
</tr>
<tr valign="top">
<td width="100%" bgcolor="$the_altcolor1" align="left"><font face="$the_font" size="$the_size2">$lang_login_no</font></td>
</tr>";
}
?>
</table>
<br>
</center></td>
</tr>
</table>
<?php
require "footer.php";
?>Code: Select all
Warning: Cannot add header information - headers already sent by (output started at c:\program files\appserv\www\forums\header.php:8) in c:\program files\appserv\www\forums\loginl.php on line 27
Warning: Cannot send session cookie - headers already sent by (output started at c:\program files\appserv\www\forums\header.php:8) in c:\program files\appserv\www\forums\loginl.php on line 29
Warning: Cannot send session cache limiter - headers already sent (output started at c:\program files\appserv\www\forums\header.php:8) in c:\program files\appserv\www\forums\loginl.php on line 29