Problema _session
Scris: Mie Aug 24, 2011
Buna ziua.
Va rog sa ma ajutati intr-o problema la care nu-i dau de capat.
Am urmatoarele coduri:
aa.php
userlogin.php
formular.php
care imi da eroarea
""Notice: Undefined variable: _SESSION in C:\Program Files\EasyPHP-5.3.5.0\www\CatalogulWeb_V.3.0\formular.php on line 2""
nu inteleg unde e greseala ?
Multumesc anticipat.
Va rog sa ma ajutati intr-o problema la care nu-i dau de capat.
Am urmatoarele coduri:
aa.php
Cod: Selectaţi tot
<form name="FormLogin" action="userlogin.php" method="post">
<label for="email">E-Mail: </label>
<input class="field" type="text" name="adremail" value="<?php echo (isset($_POST['adremail'])) ? $_POST['adremail'] : ''; ?>" size="17" /><br />
<label for="password_new">Parola: </label>
<input class="field" type="password" name="parola" size="20" /><br />
<input type="hidden" name="action" value="submit" />
<input name="Login" type="submit" value="Login" class="login_button" />
</form>
Cod: Selectaţi tot
<?php
session_start();
if(!isset($_SESSION['email']))
$_SESSION['email'] = $_POST['adremail'];
if ($_POST['adremail']=='' || $_POST["parola"]==''){
echo "Completati ambele campuri";
} else {
echo "<script>location.href='formular.php';</script>";
}
?>
Cod: Selectaţi tot
<?php
echo $_SESSION['email'];
?>
""Notice: Undefined variable: _SESSION in C:\Program Files\EasyPHP-5.3.5.0\www\CatalogulWeb_V.3.0\formular.php on line 2""
nu inteleg unde e greseala ?
Multumesc anticipat.