Page 1 of 1

Arrays through forms

Posted: Fri Jan 17, 2003 10:44 am
by Xelmepa
Hey guys,
I had made a script that used form results. I had named the form objects like form[smth] . And I had let my script use these variables like form[smth]. However I remembered that I should do it like form["smth"], so I added quotes throughout the PHP script.

I didn't add any quotations to the form though.
The question is, is $form[smth] == $form["smth"] ?

Or do I need to change the form object names too?

Thanks.

Posted: Fri Jan 17, 2003 12:24 pm
by twigletmac
You should leave the HTML form object names as (IIRC it doesn't work otherwise):

Code: Select all

<input type="text" name="form&#1111;smth]" />
and as you have already done quote the element name within the PHP script.

Mac