Jump to content
php.lv forumi

Sesijas Un Cepumi


bchild

Recommended Posts

Probleema, kas nomoka manu sirdi jau kaadu laiku un sakariiga atbilde taa arii veel nav atrasta.

Taatad: vienaa lapaa es regjistreeju sesiju:

 

login.php

 

<code><font color="#000000">

<font color="#0000CC"><?
[url=http://lv.php.net/session_start]session_start[/url]</font><font color="#006600">();

</font><font color="#0000CC">$loginname</font><font color="#006600">=</font><font color="#CC0000">"android"</font><font color="#006600">;

</font><font color="#0000CC">[url=http://lv.php.net/session_register]session_register[/url]</font><font color="#006600">(</font><font color="#CC0000">"loginname"</font><font color="#006600">);

</font><font color="#0000CC">[url=http://lv.php.net/header]header[/url]</font><font color="#006600">(</font><font color="#CC0000">"Location:second.php"</font><font color="#006600">);
</font><font color="#0000CC">?>
</font>
</font>
</code>

 

Lai dabuutu jau regjistreeto SESSION variabli es parasti kabinu klaat SID:

 

<code><font color="#000000">
<font color="#0000CC"><? [url=http://lv.php.net/header]header[/url]</font><font color="#006600">(</font><font color="#CC0000">"Location:second.php"</font><font color="#006600">.</font><font color="#0000CC">SID</font><font color="#006600">); </font><font color="#0000CC">?></font>
</font>
</code>

 

un viss straadaa, kaa naakas.

 

Bet tagad man ir nepiecieshamiiba tikt valjaa no session id ieksh URL. Manuaali staasta par otru veidu: cookies, bet netiek tieshi paskaidrots, kaa to dariit, tb. kaa dabuut regjistreetaas variables jaunaa lapaa, lai jamais ar session_start(); nevis regjisree jaunu tukshu sesiju, bet njem ieprieksheejo?

 

P.S: session.use_trans_sid = 1 shajaa gadiijumaa nav eneiblojams.

Link to comment
Share on other sites

×
×
  • Create New...