View Single Post
  #1 (permalink)  
Old 02-09-2002, 01:48 PM
joyce's Avatar
joyce joyce is offline
Novice Webmaster
 
Join Date: Nov 2001
Location: Malaysia
Posts: 23
Rep Power: 0
joyce is on a distinguished road
array_splice? unset? which function is appropriate??

can anyone tell me wat is the appropriate function to use for this situation??

i have all my ids stored in session and when user clicked add, then it will add into the cart. i display the user cart in a table with checkboxes beside each row of record. when user clicked the checkbox and delete, it should delete the record.

i've tried using unset(), but it doesn't work for my case. none of the records are able to delete. then i switch to array_splice. by using this array, i manage to delete, but there is a problem, which is if user clicked the middle record, not the first one, but clicked the middle record, then it will delete the first record instead of the middle record.

i really donot know which function is approriate for me to use. i really need help on this. pls advice me..
Reply With Quote