Dec 6th, 2009, 9:40 AM
Hi Aalsmo,
You'll see those notices when your error reporting is set quite high. This particular message just means that the $fields variable doesn't have a "name" key. No big deal! By default, Form Tools is configured to show ALL errors - even minor notices & warnings like this one.
There's two ways to fix it.
1. Suppress the error by adding a "@" symbol before the variable, like so:
(notice the @$fields["name"] bit).
2. Alternatively, you can add the following line to your global/config.php file:
That will prevent ALL minor errors like this one from showing up and only show genuine "error" errors.
All the best -
Ben
You'll see those notices when your error reporting is set quite high. This particular message just means that the $fields variable doesn't have a "name" key. No big deal! By default, Form Tools is configured to show ALL errors - even minor notices & warnings like this one.
There's two ways to fix it.
1. Suppress the error by adding a "@" symbol before the variable, like so:
Code:
<td width="312"><input type="text" name="name" id="name" value="<?=htmlspecialchars(@$fields["name"])?>"></td>
(notice the @$fields["name"] bit).
2. Alternatively, you can add the following line to your global/config.php file:
PHP Code:
$g_default_error_reporting = 1;
That will prevent ALL minor errors like this one from showing up and only show genuine "error" errors.
All the best -
Ben