I try to make a session variable where the session variable name should be diffrent, and therefore i make the session variable name a variable name:
$nummer = $_POST['nummer'];
$num = $nummer;
$vareInfo = array(
"vareNummer" => "$nummer",
"vareNavn" => "$vare",
"varePris" => $pris,
"vareBillede" => $VarBillede,
"vareAntal" => $antal
);
$_SESSION[$num] = $vareInfo;
$_SESSION[$pris] = "hukabuka";
but i dosen't work, i just changeching the the other sessioen to the new value?
it output this:
Array ( [vareNummer] => 182162
[vareNavn] => Solsikke
[varePris] => 120
[vareBillede] => 63c7cba6cac6d7.24544415.jpg
[vareAntal] => 1
)
and next time i run it it changing it instead of making a new