Ben çevrimiçi bulunan bir örnek kullanılmış ve benim kod uyguladım ettik:
<?php
session_start();
if (isset($_REQUEST["email"]))
{
$_SESSION["name"] = true;
$host = $_SERVER["HTTP_HOST"];
$path = dirname($_SERVER["PHP_SELF"]);
$sid = session_name() . "=" . session_id();
header("Location: index.php?$sid");
exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
...
...
and rest of the html code
Ben bu sayfayı açtığınızda, bir hata var:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /data/server/user/directory/sub-directory/login.php:1) in /data/server/user/directory/sub-directory/login.php on line 2
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /data/server/user/directory/sub-directory/login.php:1) in /data/server/user/directory/sub-directory/login.php on line 2
Ben bu sorunu çözmek için etrafına baktı ve aynı zamanda bu sitede bu konuda birkaç mesaj gördüm, ama ben sadece bu konuda iyi bir kavrama alınamıyor ... cevap bulamıyorum.
Lütfen yardım edin.
Teşekkürler.