
session_start
Publicado por Tomás (81 intervenciones) el 04/11/2013 22:43:54
Hola, muy buenas.
Tengo un problema y es el siguiente:
Y este es el code:
P.D: Nunca me había dado este error. Raro.
Tengo un problema y es el siguiente:
1
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\xampp\htdocs\login.php:1) in C:\xampp\htdocs\login.php on line 3
Y este es el code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
include "./src/config.php";
session_start();
?>
<!DOCTYPE html>
<html lang="es" />
<head>
<title>Mss</title>
<link href="style.css" rel="stylesheet">
<meta charset="UTF-8" />
</head>
<body>
<div class="nav">
<a href="#">Volver al Inicio</a>
</div>
<div class="arriba"></div>
<div class="medio">
<div class="logo"></div>
<?php
if(isset($_SESSION['logged'])){
echo $_SESSION['usuario'];
}
else{
echo '
<center><form action="verify.php" method="POST">
<input type="text" name="usuario" placeholder="Usuario"><br><br>
<input type="password" name="password" placeholder="Contraseña"><br><br>
<input type="submit" name="login" value="Acceder" class="criar">
</form>';} ?>
</div>
<div class="abajo"></div>
</body>
</html>
P.D: Nunca me había dado este error. Raro.
Valora esta pregunta


0