11
hulk8
Re: How destroy a variable in a session ?
  • 2006/10/16 17:11

  • hulk8

  • Just popping in

  • Posts: 11

  • Since: 2005/3/16


I've found this afternoon a solution. It's a question of "structure". For my explication, i have simplified the code.

Before, i made that:
le="color: #000000"><?php for ($i=0; $i<$nbvar,$i++) { $_SESSION["var['contact'][$i]"]=$value1[$i]; $_SESSION["var['adresse'][$i]"]=$value2[$i]; } //and for desrtroy unset($_SESSION["var['contact']"]); unset($_SESSION["var['adresse']"]); // but that doesn't work


But now i do that:

le="color: #000000"><?php for ($i=0; $i<$nbvar,$i++) { $var["$i"]['contact']=$value1[$i]; $var["$i"]['adresse']=$value2[$i]; } $_SESSION['var']=$var; //and for desrtroy unset($_SESSION["var"]); // and that work :-D

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits