Re: 4 hours staring - can't see clear.
| From: | John Taylor-Johnston | Date: | Thu, 12 Jun 2003 16:42:58 +0000 |
| Subject: | Re: 4 hours staring - can't see clear. | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151278@lists.php.net to get a copy of this message | ||
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 .= ')';