
Originally Posted by
russellr
Unfortunately, that thread just scratches the surface of what I need to know.
Part of the problem is that if I wait until fmhookprefinish.inc to perform my validation, the email with all the data (including the bad data) has already been sent.
I've studied ttfm.php, and I want to expand this portion where you perform special condition checks:
Code:
//
// check complex conditions
//
if (!CheckConditions($SPECIAL_VALUES["conditions"],$aAllRawValues,$missing,$a_missing_list))
UserError("failed_conditions",GetMessage(MSG_COND_ERROR),$missing,$a_missing_list);
//
// check imgverify
//
if (isset($SPECIAL_VALUES["imgverify"]) && !empty($SPECIAL_VALUES["imgverify"]))
{
//
// VerifyImgString is from Tectite's simple verifyimg.php CAPTCHA
// turing_string is from Captcha Creator
//
.
.
.
//
// Hook system: after performing required and conditions etc.
//
if ($HOOK_DIR !== "")
@include("$HOOK_DIR/fmhookchecks.inc");
If my customer has requested an ID that is NOT available, and I determine that in fmhookchecks.inc (by doing a MySQL look-up), do I also in fmhookchecks.inc execute these two lines?
Code:
$b_bad = true;
UserError("failed_conditions","Requested ID is already in use","","");
or can I just execute this:
Code:
Error("failed_conditions","Requested ID is already in use");
Bookmarks