Lars, Much thanks. Life saving :)
Ignatius, I like your idea. Thanks to you too.
John


>         if (isset($var[$key]['Option']))
>         {
>             // Flag that we got one this time round.
>             $found = true;
>             // Get the translated name from $var.
>             $record[$var[$key]['Option']] = addslashes(trim($val));
>         }
>
> $sep = '';
> $sql = "insert into .....values (";
> foreach ($record as $name=>$val)
> {
>     $sql .= $sep . "'" . addslashes($val) . "'";
>     $sep = ',';
> }
> $sql .= ')';

Reply via email to