Hello, longtime user for basic forms. Best Joomla! form component!
I am needing to design a form that will take an email address input by the visitor, split the domain address into a variable, and lookup that string in a text file or other location (doesn't matter), and then based on the result, redirect the visitor to another URL on the same page.
The purpose of this is for our customers to enter their email address, and be redirected to the correct login/information page based on their email server. Example data:
domain1.com >> server1.mail.com
domain2.com >> server2.mail.com
domain3.com >> server1.mail.com
Here is the pseudo that I've worked out so far:
But I'm really lost and this is a bit above my skill level. Any help would be appreciated.🙂
I am needing to design a form that will take an email address input by the visitor, split the domain address into a variable, and lookup that string in a text file or other location (doesn't matter), and then based on the result, redirect the visitor to another URL on the same page.
The purpose of this is for our customers to enter their email address, and be redirected to the correct login/information page based on their email server. Example data:
domain1.com >> server1.mail.com
domain2.com >> server2.mail.com
domain3.com >> server1.mail.com
Here is the pseudo that I've worked out so far:
$em="mynam@domain.com";
$ar=split("@",$em);
$search = 'whatever';
foreach (glob($dir . '/servers.txt') as $file) {
if match::server1 {
header (location: $document->baseurl/index.php?option=com_content&task=view&id=XX&Itemid=YY
break;
} elseif match::server2 {
header (location: $document->baseurl/index.php?option=com_content&task=view&id=XX&Itemid=YY
} else {
echo "Could not find account information. Please check your entry.";
}
}
But I'm really lost and this is a bit above my skill level. Any help would be appreciated.🙂