Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-09-2002, 01:48 PM
joyce's Avatar
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..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-09-2002, 04:51 PM
Senior Webmaster
 
Join Date: Oct 2001
Location: Kuala Lumpur, Malaysia
Posts: 294
Rep Power: 93
kidino is on a distinguished road
Send a message via Yahoo to kidino
Sorry ... couldn't understand you. Rephrase please ... perhap with example.
__________________
--------------------------------------------
Khairil Iszuddin Ismail
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-09-2002, 01:37 PM
Novice Webmaster
 
Join Date: Aug 2002
Posts: 14
Rep Power: 0
goatstudio is on a distinguished road
Are you saying you store an array in session? Can be more detail?
__________________
Freedom is a Right
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 17-09-2002, 02:12 PM
bazet's Avatar
Novice Webmaster
 
Join Date: Aug 2001
Location: Ampang KL
Posts: 93
Rep Power: 90
bazet is on a distinguished road
Send a message via ICQ to bazet Send a message via AIM to bazet Send a message via Yahoo to bazet
If me, I'll use DB to store array info for a while. So my session can delete the array and re-add the array anytime.

PHP Code:
function var_to_object($obj)
{
    
//
    // transform any var to object
    // useful in cookie container
    //

    
$z base64_encode(serialize($obj));
    return 
$z;
}

function 
object_to_var($var)
{
    
//
    // Re-transform back the object from var
    // to its original manner
    //

    
$z unserialize(base64_decode($var));
    return 
$z;

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed in loadMovie() function! eric Website Design 9 24-05-2004 10:34 AM
print function ardella Website Programming 2 13-05-2004 12:50 AM
stripslashes() function for JSP? lcf Website Programming 3 21-04-2004 10:06 PM
how to make function that automatically parse url full time kille Website Programming 6 08-11-2002 05:59 PM
tablet yg ada function 'pressure' adi Website Design 6 15-05-2002 05:52 PM


All times are GMT +8. The time now is 10:34 AM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61