Hi,
Yes, what you're trying to do is fine.
So, there must be an error or two in the code.
First, the correct HOOK file name for this is "formmail-postconfig.inc.php".
This ensures you're changing TARGET_EMAIL after the configuration section.
The second concern would be the return of fetchAll. Does it return an array of rows, or a single row?
If a single row, then you need "$the_email['email']" instead.
To check everything, add this code to the end of the hook file:
PHP Code:echo '<pre>';
echo var_dump($the_email,true);
echo var_dump($TARGET_EMAIL,true);
echo '</pre>';
exit;


Reply With Quote
Bookmarks