Dave,
You might want to try putting brackets after the array name in your
input statement like this:

<input type='hidden' name='row[]' value=$row>

By placing [] after the variable name, you tell PHP to treat it as an
array instead of as a scalar.

Dale

--- In [email protected], David Halliday <[EMAIL PROTECTED]> wrote:
>
> Thanks. 
> var_dump ($_REQUEST) displayed the word 'Array'.
> 
> I think there is a basic problem with passing array
> variables via forms. Look have even tried a simple to
> pass a small array variable just to test the
> principle, test like this one:-
> 
> 
> # p1.php 
> <?
> $row = array
> (
>       "BOOK1" => "PHP",
>       "BOOK2" => "JAVA",
> );
> ?>
> <html><body>
> <form method='POST' action='p2.php'>
> <input type='hidden' name='row' value=$row>
> <input type='submit' value='Submit' name='submit'>
> </form>
> </body></html>
> 
> 
> #p2.php
> 
> <?
> $row = $_POST['row'];
> foreach ($row as $BOOK => $VALUE)
> {
> echo $BOOK . ':' . $VALUE;
> }
> ?>
> 
> and Im still getting the Warning: invalid arguement
> etc..
> 
> also:
> echo $row;  // produced 'Array'
> 
> echo $row[0]; // produced 'A'
> echo $row [1]; // produced 'r'
> 
> and so on..
> 
> It baffles me really .. this is now elementary PHP not
> working as expected!!!
> 









The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to