PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
chris12295
Forum Contributor
Posts: 113 Joined: Sun Jun 09, 2002 10:28 pm
Location: USA
Contact:
Post
by chris12295 » Sun Jun 30, 2002 11:06 pm
I need to pass an array to my php script but i need the values to be a hidden form element. How can i do this?
hob_goblin
Forum Regular
Posts: 978 Joined: Sun Apr 28, 2002 9:53 pm
Contact:
Post
by hob_goblin » Sun Jun 30, 2002 11:34 pm
<input type="hidden" name="array['key']" value="value" />
<input type="hidden" name="array['key2']" value="value" />
<input type="hidden" name="array['key2']" value="value" />
twigletmac
Her Royal Site Adminness
Posts: 5371 Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK
Post
by twigletmac » Mon Jul 01, 2002 1:58 am
If there's a lot of values it may be easier to use sessions instead.
Mac
hob_goblin
Forum Regular
Posts: 978 Joined: Sun Apr 28, 2002 9:53 pm
Contact:
Post
by hob_goblin » Mon Jul 01, 2002 2:17 am
true, or maybe you could do like
<input type="hidden" name="parseme" value="value|value2|value3" />
and then do like
$finalvar = explode("|", $parseme);