[PHP] Arrays and Forms

2002-05-19 Thread Navid Y.
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

Re: [PHP] Arrays and Forms

2002-05-19 Thread Jason Morehouse
Try: input type=text name=product[] ? foreach ($product as $p) { print $p; } ? On Mon, 20 May 2002 11:05:07 +1200, 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

Re: [PHP] Arrays and Forms

2002-05-19 Thread Jason Wong
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

Re: [PHP] Arrays and Forms

2002-05-19 Thread Miguel Cruz
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

Re: [PHP] Arrays in forms {?!}

2002-04-24 Thread Marcus Rasmussen
1) The example you have shown should work. Take a look at the foreach controle structure. (Link at bottom of mail.) 2) You cannot assign a value to a checkbox. It can only be set by the checked keyword (ie: input type=checkbox name=foo checked.) 3) The value of a checked checkbox is on. If a

[PHP] Arrays in forms {?!}

2002-04-23 Thread Liam MacKenzie
Hi all, I have a form, with about 40 checkboxes, I want to write a PHP document that processes the submission and displays the values of the checkboxes that were checked. Pretty basic stuff, I've tried a few different things, some work but display Array at the top of the list of values.

Re: [PHP] Arrays in forms {?!}

2002-04-23 Thread Miguel Cruz
On Wed, 24 Apr 2002, Liam MacKenzie wrote: Snippet of PHP while ( $element = each( $games ) ) { echo $element[value]; echo br; } /Snippet of PHP I tried this too, it gave the same results as the above... if (is_array($games)) { for ($z=0;$zcount($games);$z++) { echo

[PHP] arrays in forms.

2001-07-07 Thread John Meyer
Hi, I have a multi-select listbox set up like this: Author (you are able to select more than one.a href=addauthor.phpClick here to add a new author/a)br: select name=author multiple size=5 ?php $result = mysql_query(SELECT AUTHOR_ID, AUTHOR_FNAME, AUTHOR_LNAME FROM AUTHORS;) or

Re: [PHP] arrays in forms.

2001-07-07 Thread John Meyer
mysql_auery($query) or die(echo mysql_error()); By the way, I know this line should be mysql_query John Meyer [EMAIL PROTECTED] Programmer If we didn't have Microsoft, we'd have to blame ourselves for all of our programs crashing -- PHP General Mailing List

[PHP] Arrays from forms

2001-02-04 Thread Jamie
Can someone please help me with this code I'm having major problems with arrays. This code is part of a function I'm writing to deal with an array returned from a HTML form of check boxes so if anyone has an example of this sort of thing I'd appreciate a look at it. Anyway Code follows :

Re: [PHP] Arrays from forms

2001-02-04 Thread Steve Werby
"Jamie" [EMAIL PROTECTED] wrote: $results = mysql_query("SELECT option_type, code FROM options WHERE code='000' ORDER BY option_type",$db); mysql_fetch_array($results); // From what understand I should have an array some thig like this: // ("Size"="A4" , "Size" = "A3", "Size"="A5",