On Thursday 16 January 2003 20:58, [EMAIL PROTECTED] wrote:
> Hello Everyone,
>
> I've attempted this many times, but have failed to understand it each time.
> I want to make it easier for myself to deal with passing variables through
> a form. So I thought, why not use a single array variable to do that. If I
> do such a thing, what steps do I need to take to ensure that the values in
> the array are intact just as the user entered it? How do I serialize array
> data from an initial form? Here's a simple example of what I might have:
>
> <form method="post" action="some_page.php">
>    <input type="text" name="form_vars['firstname']"></input>
>    <input type="text" name="form_vars['lastname']"></input>
>    <input type="text" name="form_vars['address']"></input>
>    <input type="text" name="form_vars['city']"></input>
>    <input type="text" name="form_vars['state']"></input>
>    <input type="text" name="form_vars['zip']"></input>
> </form>
>

 <form method="post" action="some_page.php">
    <input type="text" name="form_vars[firstname]"></input>
    <input type="text" name="form_vars[lastname]"></input>
    <input type="text" name="form_vars[address]"></input>
    <input type="text" name="form_vars[city]"></input>
    <input type="text" name="form_vars[state]"></input>
    <input type="text" name="form_vars[zip]"></input>
 </form>

some_page.php
<?
$form_vars = $_POST["form_vars"];

?>





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to