Re: [PHP] POST-ing or GET-ing an array

2002-10-30 Thread rija
Why don't you launch your script once you are in the next page? like: "next" So you don't have to get or post anything? $sql = "select stuff from my_table"; $result = mysql_query($sql); $count = 0; while ($myrow = mysql_fetch_assoc($result)) { $id = $myrow["id"]; $my_array[] = $id; } - Ori

RE: [PHP] POST-ing or GET-ing an array

2002-10-30 Thread Ford, Mike [LSS]
> -Original Message- > From: Paul Nicholson [mailto:paul@;dtnicholson.com] > Sent: 29 October 2002 19:10 > To: Sascha Cunz; Petre Agenbag; [EMAIL PROTECTED] > > Hey, > I think you should be able to serialize and urlencode the > array and then > pass that via get/post.post would be a l

Re: [PHP] POST-ing or GET-ing an array

2002-10-29 Thread Sascha Cunz
> Hey, > I think you should be able to serialize and urlencode the array and then > pass that via get/post.post would be a lot better as get is limited to > so many chars. Something like: > $sql = "select stuff from my_table"; > $result = mysql_query($sql); > while ($myrow = mysql_fetch_assoc($

Re: [PHP] POST-ing or GET-ing an array

2002-10-29 Thread Paul Nicholson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, I think you should be able to serialize and urlencode the array and then pass that via get/post.post would be a lot better as get is limited to so many chars. Something like: $sql = "select stuff from my_table"; $result = mysql_query($sql); w

Re: [PHP] POST-ing or GET-ing an array

2002-10-29 Thread Kevin Stone
Checkout serialize(); and unserialize(); http://www.php.net/manual/en/function.serialize.php http://www.php.net/manual/en/function.unserialize.php //On your first page.. $myarray = serialize($myarray); echo "Link"; //Then on your other page.. $myarray = unserialize($_GET['myarray']); print_r($mya

Re: [PHP] POST-ing or GET-ing an array

2002-10-29 Thread Petre Agenbag
Oops, I forgot to add the $count++ at the end of the while loop, but that was just an ommission of this post, in my real code, the array is created fine ( tested it with a print_r($my_array) ). On Tue, 2002-10-29 at 19:40, Petre Agenbag wrote: > Hi > I KNOW I'm gonna get flamed, but I can't find

Re: [PHP] POST-ing or GET-ing an array

2002-10-29 Thread Sascha Cunz
Hi, first of all, i would prefer to do this task in a session-variable (less traffic, less security holes). But, if you're sure you need to pass the array via an URL, try: which will result in test.php called with $_GET['ary'] containing: [0] = '1' [1] = '2' If the array contains strings (a