For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > August 2006 > to assign a hidden, more values









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author to assign a hidden, more values
artev

2006-08-30, 3:57 am

if inner a form I have :
foreach ($arrayquery as $a)
{ echo <input type="hidden" name="x1" value=" $a->type" >;
echo <input type="hidden" name="x2" value=" $a->color" >;
echo <input type="hidden" name="x3" value=" $a->pos" >;
}

and in:
<script type=text/javascript>
var test1=document.form.x1;
var test2=document.form.x2;
var test3=document.form.x3;
....code
</script>

now I want to use only a field hidden for all value;
I thinked some similar:
$arr=[[$a->type]=>[$a->color,$a->pos]];
<input type="hidden" name="x1[]" value="$arr" >;
the problem is here (to put array) and after
in the script javascript


is there some example online or your solution ?
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com