send 1 dim array as hidden type via form
From: hubert (hubert_beaumont_at_binuscan.com)
Date: 10/22/04
- Next message: rachel: "Passing arrays as session variables"
- Previous message: Jonas Witt: "ftp_size() with size > 2^31?"
- Next in thread: Paul Barfoot: "Re: send 1 dim array as hidden type via form"
- Reply: Paul Barfoot: "Re: send 1 dim array as hidden type via form"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 22 Oct 2004 03:43:35 -0700
Hi,
I am willing to send an array via a form. For some reasons it doesn't
work, is somebody can tell me why?
Sending code as follow:
$testarray = array_fill(0, 255, 0);
<form name="form1" method="get" action="http://www.blablabla">
<input name="imageField" type="image" src="histo.gif"
width="300" height="20" border="0">
<input type="hidden" name="redarray" value = "<? echo $testarray
?>" >
</form>
Receiving page as follow:
$RedHistogram = array_fill(0, 255, 0);
$result = count($RedHistogram);
print "Size 1: ";
print $result;
print "<br>";
$RedHistogram = $_GET['redarray'];
print $RedHistogram;
print "<br>";
$result = count($RedHistogram);
print "Size 2: ";
print "<br>";
print $result;
So size 1 returns:255
Size 2 returns:1
- Next message: rachel: "Passing arrays as session variables"
- Previous message: Jonas Witt: "ftp_size() with size > 2^31?"
- Next in thread: Paul Barfoot: "Re: send 1 dim array as hidden type via form"
- Reply: Paul Barfoot: "Re: send 1 dim array as hidden type via form"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|