The following code has ! (exclamanation point) !eregi and !trim what does
that mean?
if (!eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,6}$", $email)) {
echo "<p>It appears you entered an invalid email address</p><p><a
href='javascript: history.go(-1)'>Click here to go
back</a>.<br/><br/><br/>If Above Link Doesn't Work Please Use 'Back Arrow'
On Your Browser.<br/><br/><br/><br/><br/><br/></p>";
}
elseif (!trim($name)) {
echo "<p>Please go back and enter a Name</p><p><a href='javascript:
history.go(-1)'>Click here to go back</a>.<br/><br/><br/>If Above Link
Doesn't Work Please Use 'Back Arrow' On Your
Browser.<br/><br/><br/><br/><br/><br/></p>";
}
Thanks
On May 11, 2:47 am, "Al" <alc
@hotmail.com> wrote:
> The following code has ! (exclamanation point) !eregi and !trim what does
> that mean?
> if (!eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,6}$", $email)) {
> elseif (!trim($name)) {
! inverts the result of the function:
eregi() returns true if it finds the requested string -> !eregi()
returns true if it does not find the string
trim() returns the string without trailing spaces -> !trim() return
true if the string is empty.
cheers
Martin
------------------------------------------------
online accounting on bash bases
Online Einnahmen-Ausgaben-Rechnung
http://www.ea-geier.at
------------------------------------------------
m2m server software gmbh
http://www.m2m.at