
I've installed Formulaire which is a multiple form module (allows you to create many submit forms which can be delivered to email address, XOOPS PM or XOOPS Group PM).
There is a bug in the module which prevents the use of New Zealand email address. eg myname@mydomain.co.nz
I've tried creating a form to send to nzchainsaw @ hotmail . com and that worked. But if I type in (for example) myname@mydomain.co.nz it says this is an incorrect email address!
I've checked the codes at admin/formindex.php and found this portion which could be the cause of our problem
function addform()
{
global $xoopsDB, $HTTP_POST_VARS, $myts, $eh;
$title = $myts->makeTboxData4Save($HTTP_POST_VARS["desc_form"]);
$admin = $myts->makeTboxData4Save($HTTP_POST_VARS["admin"]);
$groupe = $myts->makeTboxData4Save($HTTP_POST_VARS["groupe"]);
$email = $myts->makeTboxData4Save($HTTP_POST_VARS["email"]);
$expe = $myts->makeTboxData4Save($HTTP_POST_VARS["expe"]);
if (empty($title)) {
redirect_header("formindex.php", 2, _MD_ERRORTITLE);
}
if((!empty($email)) && (!eregi("^[a-z0-9.-_]+@[a-z0-9]{2,}[.][a-z]{2,3}$",$email))){
redirect_header("formindex.php", 2, _MD_ERROREMAIL);
}
if (empty($email) && empty($admin) && $groupe=="0" && empty($expe)) {
redirect_header("formindex.php", 2, _MD_ERRORMAIL);
}
Can someone tell me what is this code suppose to do?
if((!empty($email)) && (!eregi("^[a-z0-9.-_]+@[a-z0-9]{2,}[.][a-z]{2,3}$",$email))){
As far as I can decipher it is along the line of
if not empty $email and ......
How can I change it to accept a @domain.co.nz address?