in pagina principala am <?php include('user_login.php'); ?> pus in lini a in care am nevoie de el
in user_login.php am pus if(!isset($_SESSION)) session_start();
Eu sunt la inceput de drum cu php-ul, pagina principala nu e facuta de mine, e un layer pe care incerc sa-l fac functional, nu are decat bannere, imagini si meniurile. Eu am intervenit doar cu ce am boldat albastru, in rest nimic, nu are nimic care ar putea starta o sesiune ...
</div>
</div>
<div id="catalog_header_right">
<div class="box1">
<div id="box1_left_section">
<div id="login">
<form name="FormLogin" action="<?php echo $_SERVER['PHP_SELF'] ?>" 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 />
<a href="#" name="recupparola" style="font-family:Arial, Helvetica, sans-serif;font-weight:normal" >Am uitat parola</a>
<input type="hidden" name="action" value="submit" />
<input name="Login" type="submit" value="Login" class="login_button" /><br />
<a href="user_nou.php" name="inregistrare" >Inregistrare</a>
<input class="field" type="text" name="adremail_log" value="<?php echo (isset($_POST['adremail_log'])) ? $_POST['adremail_log'] : ''; ?>" size="17" style="visibility:hidden"/>
</form>
</div>
<?php
if (isset($_POST['Login'])) {
include('user_login.php');
};
?>
</div>
<div id="box1_right_section">
<div class="nav-stiri">
Stiri:
<a href="#">Interne</a> |
<a href="#">Externe</a> |
<a href="#">Sport</a> |
<a href="#">Financiar</a> |
<a href="#">Monden</a> |
<a href="#">Auto</a> |
<a href="#">IT</a>
</div>
<div id="ticker-container" onmouseover="sspeed=0;" onmouseout="sspeed=resumesspeed">
<div id="ticker"></div>
</div>
</div>
</div>
<div style="margin-top:107px; margin-left:45px;">
<img id="banner_1" border="0" src="images/BANNER2.gif"></img>
</div>
<script>
function fanuntgratuit(){
if (document.FormLogin.adremail_log.value==""){
alert('Trebuie sa va logati pentru a putea inscrie un anunt.');
} else {
location.href="anunt_adauga.php";
};
};
</script><div id="box2">
<div id="box2_left_section">
<a id="aAnunt" class="LCP" href="#"
onclick="fanuntgratuit();">Adauga Anunt</a>
<a id="aSite" class="LCP" href="#">Adauga Site</a>
<a id="aFirma" class="LCP" href="#">Adauga Firma</a>
Publicitate Online
<br />
scuze ca am scos din code, dar nu imi lua boldarea si culoarea.
Nu mai stiu ce sa-i fac
stau blocata pe chestia asta de o saptamana, la inceput ca nu am pus inca un session_start unde trebuia, acum, dupa ce l-am pus a aprut chestia asta cu mesajul de eroare.