[PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread aka MacGuru
Hi, I am need to pass serialized assotiative array via form hidden field (not GET or POST). In order to do it, I did the following: urlencode(serialize($my_array)). However, after retrieving data from hidden field and unserialize I've got junk. Someone can explain me what I did wrong? Also,

Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread Mirek Novak
Andrei Verovski (aka MacGuru) napsal(a): Hi, I am need to pass serialized assotiative array via form hidden field (not GET or POST). In order to do it, I did the following: urlencode(serialize($my_array)). However, after retrieving data from hidden field and unserialize I've got junk. Someone

Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread Jacob Vennervald Madsen
Just tried it out and you should use htmlspecialchars() instead of urlencode(). When you put it in a hidden field the browser is responsable for urlencoding the data. Jacob On Mon, 2003-07-21 at 09:24, Andrei Verovski wrote: Hi, I am need to pass serialized assotiative array via form hidden

Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread John Nichel
Andrei Verovski (aka MacGuru) wrote: Hi, I am need to pass serialized assotiative array via form hidden field (not GET or POST). In order to do it, I did the following: Uis there a third form method that I'm not aware of? urlencode(serialize($my_array)). However, after retrieving data

Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread Chris Shiflett
--- Andrei Verovski [EMAIL PROTECTED] wrote: I am need to pass serialized assotiative array via form hidden field (not GET or POST). This is impossible. A hidden form field is simply a form field that is not displayed to the user. Form actions must be GET or POST. In order to do it, I did the

Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread John Manko
Just a small point, you can have both GET and POST. -- search.html - form method=POST action='page.php?action=searchsid=09h34fnn3f0qn34f8n38fn34htq83th83qh' input name=search type=text input type=submit value='Find It!' /form - page.php $sid = $_GET['sid'];

Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread CPT John W. Holmes
--- Andrei Verovski [EMAIL PROTECTED] wrote: I am need to pass serialized assotiative array via form hidden field (not GET or POST). This is impossible. A hidden form field is simply a form field that is not displayed to the user. Form actions must be GET or POST. In order to do it, I

Re: [PHP] Passing Serialized Array via Hidden field

2003-07-21 Thread Chris Shiflett
--- John Manko [EMAIL PROTECTED] wrote: Just a small point, you can have both GET and POST. -- search.html - form method=POST action='page.php?... Notice your form method is POST, not both GET and POST. The HTTP request sent after a user submits this form will be a POST request,