I have a form that posts a bunch of data to this script that will insert into a db:

the posts are:

```
$_POST['fName'] = "bob";
$_POST['lName'] = "Jones";
$_POST['smsNum'] = "12345";
$_POST['pass1'] = "1234567890";
$_POST['company'] = "acme";
$_POST['uName'] = "bjones";
$_POST['perms'] = "user";
$_POST['active'] = "1";

```

my insert statement:

```
$ins = "INSERT into login (firstName,lastName,SMSNumber,password,company,userName,permissions,active) VALUES (:fName,:lName,:smsNum,:pass1,:company,:uName,:perms,:active)";

```

if i do this:

```
$stmt->bindParam(':fName',$_POST['fName']);
$stmt->bindParam(':lName',$_POST['lName']);
$stmt->bindParam(':smsNum',$_POST['smsNum']);
$stmt->bindParam(':pass1',$_POST['pass1']);
$stmt->bindParam(':company',$_POST['company']);
$stmt->bindParam(':uName',$_POST['uName']);
$stmt->bindParam(':perms',$_POST['perms']);
$stmt->bindParam(':active',$_POST['active']);

```

it works fine.

if I do this:

```
foreach($_POST as $k => $v)
{
    $stmt->bindParam(":".$k,$v);
}

```

the result is the digit "1" inserted into every field in db. any thoughts why?