spooks, on 25 January 2010 - 03:27 AM, said:
Issue is now gone and all works correctly. Thank you!
With the checks in place as they are, there should be no need for an annoying CAPTCHA system, which will make things easier on the customer.
Posted 25 January 2010 - 06:57 PM
spooks, on 25 January 2010 - 03:27 AM, said:
Posted 25 January 2010 - 08:41 PM
spooks, on 24 January 2010 - 03:09 PM, said:
/**
Validate an email address.
Provide email address (raw input)
Returns true if the email address has the email
address format and the domain exists.
*/
function validEmail($email)
{
$isValid = true;
$atIndex = strrpos($email, "@");
if (is_bool($atIndex) && !$atIndex)
{
$isValid = false;
}
else
{
$domain = substr($email, $atIndex+1);
$local = substr($email, 0, $atIndex);
$localLen = strlen($local);
$domainLen = strlen($domain);
if ($localLen < 1 || $localLen > 64)
{
// local part length exceeded
$isValid = false;
}
else if ($domainLen < 1 || $domainLen > 255)
{
// domain part length exceeded
$isValid = false;
}
else if ($local[0] == '.' || $local[$localLen-1] == '.')
{
// local part starts or ends with '.'
$isValid = false;
}
else if (preg_match('/\\.\\./', $local))
{
// local part has two consecutive dots
$isValid = false;
}
else if (!preg_match('/^[A-Za-z0-9\\-\\.]+$/', $domain))
{
// character not valid in domain part
$isValid = false;
}
else if (preg_match('/\\.\\./', $domain))
{
// domain part has two consecutive dots
$isValid = false;
}
else if
(!preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/',str_replace("\\\\","",$local)))
{
// character not valid in local part unless
// local part is quoted
if (!preg_match('/^"(\\\\"|[^"])+"$/',str_replace("\\\\","",$local)))
{
$isValid = false;
}
}
if ($isValid && !(checkdnsrr($domain,"MX")))
{
// domain has no mail server
$isValid = false;
}
}
return $isValid;
}
Posted 25 January 2010 - 09:49 PM
Munchies, on 25 January 2010 - 08:41 PM, said:
Posted 26 January 2010 - 12:20 AM
Posted 26 January 2010 - 12:31 AM
Roaddoctor, on 26 January 2010 - 12:20 AM, said:
Posted 26 January 2010 - 12:53 AM
spooks, on 26 January 2010 - 12:31 AM, said:
Posted 26 January 2010 - 01:39 AM
Roaddoctor, on 26 January 2010 - 12:53 AM, said:
return preg_replace("/[^\p{L}\d\r@ :{}_.-]/i", "", urldecode($vars)); return preg_replace("/[^\p{L}\w\r@ :{}_.-]/i", "", urldecode($vars));
Posted 26 January 2010 - 02:22 AM
spooks, on 26 January 2010 - 01:39 AM, said:
return preg_replace("/[^\p{L}\d\r@ :{}_.-]/i", "", urldecode($vars)); return preg_replace("/[^\p{L}\w\r@ :{}_.-]/i", "", urldecode($vars)); Posted 26 January 2010 - 03:14 AM
Roaddoctor, on 26 January 2010 - 02:22 AM, said:
Posted 26 January 2010 - 04:56 AM
return preg_replace("/[^\p{L}\p{M}\w\r@ :{}_.-]/i", "", urldecode($vars));
Posted 26 January 2010 - 12:42 PM
Roaddoctor, on 26 January 2010 - 04:56 AM, said:
Posted 26 January 2010 - 03:06 PM
[b]Parse error[/b]: syntax error, unexpected $end in [b]/home/XXXXX/public_html/TESTSITE/account_edit.php[/b] on line [b]436[/b]
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
Edited by Mark Evans, 15 February 2010 - 09:53 PM.
Posted 26 January 2010 - 05:06 PM
tigergirl, on 26 January 2010 - 03:06 PM, said:
[b]Parse error[/b]: syntax error, unexpected $end in [b]/home/XXXXX/public_html/TESTSITE/account_edit.php[/b] on line [b]436[/b]
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
<td class="main"><?php echo ($name ? $name . tep_draw_hidden_field('name',$name) : tep_draw_input_field('name', '', 'size="28"')); ?></td>
to<td class="main"><?php echo tep_draw_input_field('name', $name , 'size="28"'); ?></td>
Edited by Mark Evans, 15 February 2010 - 09:54 PM.
Posted 26 January 2010 - 05:57 PM
spooks, on 26 January 2010 - 05:06 PM, said:
<td class="main"><?php echo ($name ? $name . tep_draw_hidden_field('name',$name) : tep_draw_input_field('name', '', 'size="28"')); ?></td>
to<td class="main"><?php echo tep_draw_input_field('name', $name , 'size="28"'); ?></td>
Posted 26 January 2010 - 06:08 PM
tigergirl, on 26 January 2010 - 05:57 PM, said:
<td class="main"><?php echo ($account['customers_lastname'] ? $name . tep_draw_hidden_field('name',$name) : tep_draw_input_field('name', $name, 'size="28"')); ?></td>
Posted 26 January 2010 - 06:31 PM
spooks, on 26 January 2010 - 06:08 PM, said:
<td class="main"><?php echo ($account['customers_lastname'] ? $name . tep_draw_hidden_field('name',$name) : tep_draw_input_field('name', $name, 'size="28"')); ?></td>Quote
define('EMAIL_SUBJECT', 'Web Enquiry from ' . STORE_NAME);
Sorry for being fussy Posted 26 January 2010 - 07:44 PM
tigergirl, on 26 January 2010 - 06:31 PM, said:
$xipaddress = $_SERVER["REMOTE_ADDR"];add:
$subject = $subject ? $subject : EMAIL_SUBJECT;
Posted 27 January 2010 - 10:22 AM
spooks, on 26 January 2010 - 07:44 PM, said:
$xipaddress = $_SERVER["REMOTE_ADDR"];add:
$subject = $subject ? $subject : EMAIL_SUBJECT;
Posted 27 January 2010 - 06:29 PM
Edited by aelalfy1989, 27 January 2010 - 06:30 PM.
Posted 27 January 2010 - 07:50 PM
aelalfy1989, on 27 January 2010 - 06:29 PM, said: