hey just wondering if you may be able to solve this error for me, its a php join login system, you can signup ok, but when you go to sign in, I get these errors and wont login, im very new to php so take it easy on any questions........errors and login file as follows....
Warning: Cannot modify header information - headers already sent by (output started at /home/maybe/public_html/login.php:1) in /home/maybe/public_html/login.php on line 68
Warning: Cannot modify header information - headers already sent by (output started at /home/maybe/public_html/login.php:1) in /home/maybe/public_html/login.php on line 69
your now being logged in!
login file......
<?php
// Instant Network
// Version: 1.0
// Creator: m <blah@gmail.com>
// Support Website: http://www.flowstream-net.com/index.php
// Check the as this is the.
// CopyRight 2005 - mgnchat /
//Database/Mysql//
$dusername = "blahmevv"; //username to connect to database
$dpwd = "balhmemm"; //password to accecss mySQL
$dhost = "localhost"; //your db host usually localhost
$dbname = "freddynnnn"; //db name to be accessed
$conn = mysql_connect("$dhost","$dusername","$dpwd") or die ("Unable to connect to database.");
$db=mysql_select_db($dbname,$conn) or die("Unable to connect to database!");
//Global Vars
$sitepath = "/home/blahe/public_html/"; //sitepath without trailing backslash
$siteurl = "http://mgnchat.com"; //siteurl without trailing backslash
$sitetitle = 'MySite'; //site title
$version = '1.0Alpha'; //site verion
$years = '2005'; // the copy right years
$sitename = 'MySite'; //Site Name
$colour = array(
// key => "file:name",
0 => "red_night:Red Night",
1 => "blue_night:Blue Night",
2 => "emerald_night:Emerald Night",
);
include("functions.php");
if($action==login)
{
if($COOKIE[username]=="" AND $COOKIE[password]=="")
{
$md5_password = md5($POST[password]);
$sql = mysql_query("SELECT * FROM users WHERE username = '$POST[username]' AND password = '$md5_password'") OR DIE("Sorry there is a mysql error.");
$row = mysql_fetch_array($sql);
$numrows = mysql_num_rows($sql);
if($POST[password]=="")
{
print("No password Entered.");
login_form();
exit;
}
elseif($POST[username]=="")
{
print("No username Entered.");
login_form();
exit;
}
elseif($numrows == "0")
{
print("Username and Password doesnt match!");
login_form();
exit;
}
else
{
setcookie("username","$_POST[username]",time()+30000000);
setcookie("password","$md5_password",time()+30000000);
echo "<meta http-equiv=refresh content=\"5;url=/loggedin.php\">";
print("your now being logged in!");
}
}
else
{
print("Your are already loggedin!");
}
}
if($action=="")
{
login_form();
}
?>
the errors stop it from setcookies username pass
Thanks to anyone that can helpπ