Re: Arrays and Forms
| From: | Miguel Cruz | Date: | Mon, 20 May 2002 05:40:57 +0000 |
| Subject: | Re: Arrays and Forms | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-98421@lists.php.net to get a copy of this message | ||
Your code looks fine. Are you sure you haven't edited away significant
parts of it when posting to the list? Maybe a <input name="product">
somewhere?
miguel
On Sun, 19 May 2002, Navid Y. wrote:
> I'm having trouble sending array values through forms.
> Will the following syntax create a variable called $product['desc'] on
> the next page?
> If not, what am I doing wrong here?
>
> Note: I tried this but it didn't work! When I tried doing it without
> using an array, but rather with a regular variable, it sent through just
> fine and created a variable of the name attribute in the input tag.
>
>
> menu_add.php
> -------------
> <form method="post" action="menu_list.php">
> <input type="text" name="product[desc]">
> </form>
>
>
> menu_list.php
> -------------
> echo $product['desc'];
>
>
> Result output
> -------------
> no output
>
>
>