Re: Array as hidden input, again

From: Date: Thu, 28 Sep 2000 12:59:44 +0000
Subject: Re: Array as hidden input, again
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-3137@lists.php.net to get a copy of this message
Hi, Mirko! The prova.php should like something this:: ------------------------------------------- <? $arr=array(); $arr[1]=11; $arr[2]=12; $arr[3]=13; for ($i=0;$i<count($arr);$i++): echo "<form method=\"post\" method=\"prova1.php\">"; echo "<input type=\"hidden\" name=\"arr[]\" value=".$arr[$i].">"; echo "<input type=submit value=\"NEXT\">"; echo "</form>"; endfor; ?> bye Zoltan File prova.php: ------------------------------------------- <? $arr=array(); $arr[1]=11; $arr[2]=12; $arr[3]=13; echo "<form method=\"post\" method=\"prova1.php\">"; echo "<input type=\"hidden\" name=\"arr[]\" value=\"$arr\">"; echo "<input type=submit value=\"NEXT\">"; echo "</form>"; ?> ------------------------------------------- ------------------------------------------- File prova1.php: ------------------------------------------- <? echo "$arr[1] - $arr[2] - $arr[3]"; ?> ------------------------------------------- ------------------------------------------- The output of prova1.php on Netscape is: - - I hope someone can help me. Best regards. Mirko -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#3137) next »