Hello everybody I'd like to make a page in which the results shown can 
be bookmarked by pressing a button.
Actually first it should check if the session is open already ... Then 
if the result (that comes from a query to a MySQL table) has been 
registered already, finally it registers all the variables in a 
multidimensional array.

this is the code:

session_start();
                                           
if(!session_is_registered("bkmks"))
                                                                       
         {session_register("bkmks")||die("WE GOT PROBLEMS MAN");
$bkmks = array(array(tab=>$tab, id=>$id, url=>$url, nome=>$nome, 
ind=>$ind, com=>$com, pv=>$pv, tel=>$tel, chi=>$chi));

print "<html><body >Your choice has been 
stored</body></html>";           
                                                                       
               }
                                                                       
               else
                                                                       
               {

                                                                   
foreach($bkmks as $v)
                                                                       
               {
                                                        
if(($v[tab]==$tab)&&($v[id]==$id)){
print "<html><body You have already chosen this item</body></html>";exit;
                                                                       
                   }
                                                                       
                   }
                                                                       
$bkmks[][tab]=$tab;
                                                                       
$bkmks[][id]=$id;
                                                                       
$bkmks[][url]=$url;
                                                                       
$bkmks[][nome]=$nome;
                                                                       
$bkmks[][ind]=$ind;
                                                                       
$bkmks[][com]=$com;
                                                                       
$bkmks[][pv]=$pv;
                                                                       
$bkmks[][tel]=$tel;
                                                                       
$bkmks[][chi]=$chi;
                                                                 
                                     print "<html><body>Your choice has 
been stored</body></html>";                  
                                                                       
               }

It doesn't work! I can't figure out why.
It starts storing fine and then it seems messing up with values so it 
recognises as already stored only the variables of my first choice (the 
value stored at bkmks[0])... I tried to print values stored in the 
array: the output is a mess I don't know why!

Thanks a lot !
Bye.




-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to