<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
That's sound like a man with snow leopard which foisted 5.3 in as part
of the upgrade ;)<br>
<br>
All ours app's started to moan about quite a few things... <br>
<br>
<br>
Alex Mace wrote:
<blockquote
cite="mid:73DD6C06-5164-4AC3-B145-3D61EE6D9DB7@hollytree.co.uk"
type="cite">
<pre wrap="">Apart from the fact that eregi was deprecated in PHP 5.3 and will be
removed in 6...
Alex
On 13 Oct 2009, at 23:09, <a class="moz-txt-link-rfc2396E" href="mailto:phil@infolinkelectronics.co.uk"><phil@infolinkelectronics.co.uk></a> wrote:
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">You'd be best off performing some sort of regular expression match -
or using the filter extension ...
$email = filter_var($_POST['email'], FILTER_VALIDATE_EMAIL);
if(!$email) {
// invalid email address
}
(Requires PHP5, I think my syntax/usage is correct, but I've not
checked it)
</pre>
</blockquote>
<pre wrap="">The regex is (acting on the incoming variable $emaila)
if (!eregi (<a class="moz-txt-link-rfc2396E" href="mailto:^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4}$">"^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4}$"</a>,
$emaila)) error_alert("Invalid Email Address");
where:-
function error_alert($msg){global $flag; $flag = 1; echo
"<script>alert(\"Error: $msg\");history.go(-1)</script>";}
Thats from a page where the form, validation and sending are done as
three
invocations via a switch, case, do something and break method. a -1
history
kickback works.
The eregi bit should be fairly PHP version unspecific though.
Regards,
Phil Beynon
Sales & Operations Director
** Infolink Electronic Systems Ltd.
** S/W Birmingham's Longest Established ISV & VAR
** <a class="moz-txt-link-freetext" href="http://www.infolinkelectronics.co.uk">http://www.infolinkelectronics.co.uk</a>
** Professional Web 2.0 Design & Advanced Hosting Platforms
** <a class="moz-txt-link-freetext" href="http://www.coeus-computica.co.uk">http://www.coeus-computica.co.uk</a>
** Affordable Knowledgebase Solutions
** Contact: <a class="moz-txt-link-abbreviated" href="mailto:Sales@infolinkelectronics.co.uk">Sales@infolinkelectronics.co.uk</a>
** Tel / Fax 0121 441 3558
<Phil Beynon.vcf>_______________________________________________
Phpwm mailing list
Website : <a class="moz-txt-link-freetext" href="http://www.phpwm.org">http://www.phpwm.org</a>
Twitter : <a class="moz-txt-link-freetext" href="http://www.twitter.com/phpwm">http://www.twitter.com/phpwm</a>
Facebook: <a class="moz-txt-link-freetext" href="http://www.facebook.com/group.php?gid=2361609907">http://www.facebook.com/group.php?gid=2361609907</a>
Post to list: <a class="moz-txt-link-abbreviated" href="mailto:Phpwm@mailman.lug.org.uk">Phpwm@mailman.lug.org.uk</a>
Archive etc : <a class="moz-txt-link-freetext" href="https://mailman.lug.org.uk/mailman/listinfo/phpwm">https://mailman.lug.org.uk/mailman/listinfo/phpwm</a>
</pre>
</blockquote>
<pre wrap=""><!---->
_______________________________________________
Phpwm mailing list
Website : <a class="moz-txt-link-freetext" href="http://www.phpwm.org">http://www.phpwm.org</a>
Twitter : <a class="moz-txt-link-freetext" href="http://www.twitter.com/phpwm">http://www.twitter.com/phpwm</a>
Facebook: <a class="moz-txt-link-freetext" href="http://www.facebook.com/group.php?gid=2361609907">http://www.facebook.com/group.php?gid=2361609907</a>
Post to list: <a class="moz-txt-link-abbreviated" href="mailto:Phpwm@mailman.lug.org.uk">Phpwm@mailman.lug.org.uk</a>
Archive etc : <a class="moz-txt-link-freetext" href="https://mailman.lug.org.uk/mailman/listinfo/phpwm">https://mailman.lug.org.uk/mailman/listinfo/phpwm</a>
</pre>
</blockquote>
</body>
</html>