Re: Arrays and Forms

From: Date: Mon, 20 May 2002 03:52:46 +0000
Subject: Re: Arrays and Forms
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-98412@lists.php.net to get a copy of this message
On Monday 20 May 2002 07:05, Navid Y. wrote: > Hello Everyone, > > 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. I don't see anything wrong with the code below. You're saying ... <input type="text" name="product"> and echo $product; ... works (on the same server without any other changes)? > 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 -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* As far as the laws of mathematics refer to reality, they are not certain, and as far as they are certain, they do not refer to reality. -- Albert Einstein */

« previous php.general (#98412) next »