for ($i=0;$i<$_POST[count];$i++)
   echo $_POST['address' . $i] . '<br>';

  Concanate array key 'address' with $i

This works fine and I also can do the address[] but my ultimate result
is to put this in the database. 
So address='$_POST['address' . $i]' fails and
address='$_POST[address][$i]' fails.

I can reassign the values to new variables i.e. $address =
$_POST['address' . $i]; DB Update address='$address'
$address  $_POST[address][$i];  DB Update address='$address'

So my question is how can I put this in the database without having to
reassign my variable name?

Current Solution:
        case "process1":
                for ($i=0;$i<$_POST[count];$i++)
                        $postal=$_POST[postal1][$i] . " " .
                        mssql_query("UPDATE customer SET
. $i],city='$city' WHERE id='$customerid'") or die("DATABASE ERROR:
updating customer, residentchange process 1");

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to