noget med nogle sessions
Jeg har sådan et community. Og det funker fint nok med oprettelse og det hele, problemet er bare når man skal logge ind! så får man denne besked:Warning: Cannot send session cookie - headers already sent by (output started at /var/www/hotels/1go/bluecity/html/community/config.php:2) in /var/www/hotels/1go/bluecity/html/community/godkend.php on line 20
Warning: Cannot send session cache limiter - headers already sent (output started at /var/www/hotels/1go/bluecity/html/community/config.php:2) in /var/www/hotels/1go/bluecity/html/community/godkend.php on line 20
Warning: Cannot add header information - headers already sent by (output started at /var/www/hotels/1go/bluecity/html/community/config.php:2) in /var/www/hotels/1go/bluecity/html/community/godkend.php on line 25
koden på siden ser således ud:
<?
include ("config.php");
mysql_connect($host,$user,$pass);
mysql_select_db($db);
$query = mysql_query("SELECT navn, password, email, id FROM community WHERE navn='$navn' AND password='$password'");
if (mysql_num_rows($query) == "0"){
?>
<center>
<font color="red">Forkert Navn og/ell. Kodeord</font><br>
Prøv igen eller opret dig som medlem.
</center>
<?
} else {
while($r = mysql_fetch_array($query)) {
$s_navn = $r["navn"];
$s_password = $r["password"];
$s_email = $r["email"];
$s_id = $r["dato"];
}
session_start();
session_register ("s_navn");
session_register ("s_password");
session_register ("s_email");
session_register ("s_id");
header ("location: test.php");
}
?>
jeg fatter ikke helt hvad der er galt.
hjælp mig hvis du kan! tak
*