[PHP] POST arrays?

2006-04-20 Thread William Stokes
Hello, How to post an array with associated values? This works ok ?php $arr_siirto = array(1,2,3); print_r($arr_siirto); $arse = $arr_siirto; print_r($arse); ? But if I post it to another form with this: input type=hidden name=arr_siirt_jouk value=?php echo $arse;? And print there with:

Re: [PHP] POST arrays?

2006-04-20 Thread Stut
William Stokes wrote: How to post an array with associated values? This works ok ?php $arr_siirto = array(1,2,3); print_r($arr_siirto); $arse = $arr_siirto; print_r($arse); ? But if I post it to another form with this: input type=hidden name=arr_siirt_jouk value=?php echo $arse;? And

Re: [PHP] POST arrays?

2006-04-20 Thread William Stokes
No other way? Stut [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] William Stokes wrote: How to post an array with associated values? This works ok ?php $arr_siirto = array(1,2,3); print_r($arr_siirto); $arse = $arr_siirto; print_r($arse); ? But if I post it to another form with

Re: [PHP] POST arrays?

2006-04-20 Thread chris smith
On 4/20/06, William Stokes [EMAIL PROTECTED] wrote: Hello, How to post an array with associated values? This works ok ?php $arr_siirto = array(1,2,3); print_r($arr_siirto); $arse = $arr_siirto; print_r($arse); ? But if I post it to another form with this: input type=hidden

Re: [PHP] POST arrays?

2006-04-20 Thread Barry
William Stokes wrote: No other way? Over sessions or saving as file and loading it in the following page. -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] POST arrays?

2006-04-20 Thread William Stokes
Can someone help me to get started with serializing? I think I did'nt quite understand the manual here... How to post to $PHP_SELF and read this simple array? ? //print the posted array here print_r($arr_siirt_jouk); //create the array and post it in another name $arr_siirto = array(1,2,3);

Re: [PHP] POST arrays?

2006-04-20 Thread Stut
William Stokes wrote: Can someone help me to get started with serializing? I think I did'nt quite understand the manual here... How to post to $PHP_SELF and read this simple array? Why do you want to post it to itself? Why not use a session instead? It's a lot more efficient. ?

Re: [PHP] POST arrays?

2006-04-20 Thread nicolas figaro
William Stokes a écrit : Can someone help me to get started with serializing? I think I did'nt quite understand the manual here... serialize and unserialize don't modify your variable, but the return value is a string or a mixed (which means it can be a very complicated structure, or a

RE: [PHP] POST arrays?

2006-04-20 Thread Weber Sites LTD
Have a look at : http://www.weberdev.com/AdvancedSearch.php?searchtype=titlesearch=serializ berber -Original Message- From: William Stokes [mailto:[EMAIL PROTECTED] Sent: Thursday, April 20, 2006 1:17 PM To: php-general@lists.php.net Subject: Re: [PHP] POST arrays? Can someone help me

Re: [PHP] POST arrays?

2006-04-20 Thread William Stokes
Why do you want to post it to itself? Why not use a session instead? -I dont know. Never tried session It's a lot more efficient. -OK. Is it more complicated to write? -Will Stut [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] William Stokes wrote: Can someone help me to get

Re: [PHP] POST arrays?

2006-04-20 Thread Stut
William Stokes wrote: Why do you want to post it to itself? Why not use a session instead? -I dont know. Never tried session It's a lot more efficient. -OK. Is it more complicated to write? session is great, gets me high every time. See your local supplier or go to

Re: [PHP] POST arrays?

2006-04-20 Thread William Stokes
OK. Must try that. BTW theres something odd about my serialize. I got it return something but not quite what was expected :) Here's the result a:3:{i:0;s:1: -W Stut [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] William Stokes wrote: Why do you want to post it to itself? Why not use

Re: [PHP] POST arrays?

2006-04-20 Thread Stut
William Stokes wrote: OK. Must try that. BTW theres something odd about my serialize. I got it return something but not quite what was expected :) Here's the result a:3:{i:0;s:1: You need to use htmlentities() (http://php.net/htmlentities) on the serialized data when putting it into the

Re: [PHP] POST arrays?

2006-04-20 Thread William Stokes
Is it bad just to remove the single quotes [ ' ] ? Stut [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] William Stokes wrote: OK. Must try that. BTW theres something odd about my serialize. I got it return something but not quite what was expected :) Here's the result a:3:{i:0;s:1:

Re: [PHP] POST arrays?

2006-04-20 Thread Stut
William Stokes wrote: Is it bad just to remove the single quotes [ ' ] ? From what? In fact, yes, almost certainly bad. -Stut Stut [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] William Stokes wrote: OK. Must try that. BTW theres something odd about my serialize. I

Re: [PHP] POST arrays?

2006-04-20 Thread William Stokes
From here: $arr_siirto = array((serialize('1','2','3')); after removing the single quotes it started to work. -W Stut [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] William Stokes wrote: Is it bad just to remove the single quotes [ ' ] ? From what? In fact, yes, almost certainly

Re: [PHP] POST arrays?

2006-04-20 Thread Stut
William Stokes wrote: From here: $arr_siirto = array((serialize('1','2','3')); after removing the single quotes it started to work. Yes, the quotes here are not needed because they're numbers. If they were not numbers then the quotes would still be needed. -Stut -- PHP General Mailing

Re: [PHP] POST arrays?

2006-04-20 Thread William Stokes
You're right. BTW, can sessions and $POST be mixed? If yes is there any reason what so ever to do that? -W Stut [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] William Stokes wrote: From here: $arr_siirto = array((serialize('1','2','3')); after removing the single quotes it started

Re: [PHP] POST arrays?

2006-04-20 Thread Stut
William Stokes wrote: You're right. I'm also shocked, but only mildly. BTW, can sessions and $POST be mixed? If yes is there any reason what so ever to do that? Your question indicates that you don't understand what sessions are. Please read

Re: [PHP] POST arrays?

2006-04-20 Thread William Stokes
True. I'm not famiar with sessions. I have always used $POST to transmit variables. -W Stut [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] William Stokes wrote: You're right. I'm also shocked, but only mildly. BTW, can sessions and $POST be mixed? If yes is there any reason

Re: [PHP] POST arrays?

2006-04-20 Thread William Stokes
So. If large amount of variables are needed to be preserved in arrays or otherwise is session the (normal)way to go? -W Stut [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] William Stokes wrote: You're right. I'm also shocked, but only mildly. BTW, can sessions and $POST be

Re: [PHP] POST arrays?

2006-04-20 Thread tedd
At 3:55 PM +0300 4/20/06, William Stokes wrote: BTW, can sessions and $POST be mixed? If yes is there any reason what so ever to do that? Yes, you can use sessions, post, get, and cookies all in the same script if you want. Yes, there can be reasons to do that. tedd --

RE: [PHP] POST arrays?

2006-04-20 Thread Ing. Edwin Cruz
); ? Regards! Edwin. -Mensaje original- De: tedd [mailto:[EMAIL PROTECTED] Enviado el: Jueves, 20 de Abril de 2006 08:28 a.m. Para: William Stokes; php-general@lists.php.net Asunto: Re: [PHP] POST arrays? At 3:55 PM +0300 4/20/06, William Stokes wrote: BTW, can sessions and $POST

Re: [PHP] POST arrays?

2006-04-20 Thread Jim Lucas
William Stokes wrote: Hello, How to post an array with associated values? This works ok ?php $arr_siirto = array(1,2,3); print_r($arr_siirto); $arse = $arr_siirto; print_r($arse); ? But if I post it to another form with this: input type=hidden name=arr_siirt_jouk value=?php echo $arse;?

Re: [PHP] POST arrays?

2006-04-20 Thread Richard Lynch
On Thu, April 20, 2006 5:18 am, William Stokes wrote: How to post an array with associated values? input type=hidden name=arr_siirt_jouk value=?php echo $arse;? And print there with: print_r($arr_siirt_jouk); prints: Array So how can post the values forward?

[PHP] POST Arrays with register globals..

2002-06-12 Thread Adam Plocher
input type=checkbox name=groups[] value=1 checkednbsp; blah1br input type=checkbox name=groups[] value=2 checkednbps; blah2br input type=checkbox name=groups[] value=3 checkednbsp; blah3br I can't seem to access that data correctly when that form gets submitted. I have tried: $groups[] =

Re: [PHP] POST Arrays with register globals..

2002-06-12 Thread Mark Heintz PHP Mailing Lists
$groups = $_POST['groups']; or if(isset($_POST['groups']) is_array($_POST['groups'])) $groups = $_POST['groups']; else $groups = array(); so that groups is an (empty) array even if no checkboxes were checked mh. On Wed, 12 Jun 2002, Adam Plocher wrote: input type=checkbox

Re: [PHP] POST Arrays with register globals..

2002-06-12 Thread Analysis Solutions
Hi Adam: On Wed, Jun 12, 2002 at 01:15:03PM -0700, Adam Plocher wrote: input type=checkbox name=groups[] value=3 checkednbsp; blah3br $groups[] = $_POST['groups[]']; This is just wrong. $groups[] = $_POST['groups']; This assigns the global groups array to one element in a local groups

RE: [PHP] POST Arrays with register globals..

2002-06-12 Thread John Holmes
... -Original Message- From: Adam Plocher [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 4:15 PM To: [EMAIL PROTECTED] Subject: [PHP] POST Arrays with register globals.. input type=checkbox name=groups[] value=1 checkednbsp; blah1br input type=checkbox name=groups[] value=2 checkednbps