Don't forget about the new .name, and I thought I might mention that
preg()/PCREs would be the way to go if you're trying to make your code
readable.
Matt
-Original Message-
From: Ross Fleming [mailto:[EMAIL PROTECTED]]
For completeness, I thought I'd give the original poster the credi
For completeness, I thought I'd give the original poster the credit (just
found it): Marko Mihalec <[EMAIL PROTECTED]>
-Original Message-
From: Ross Fleming [mailto:[EMAIL PROTECTED]]
Sent: 10 April 2002 01:33
To: Matt Hillebrand; 'Egil Helland'; 'brother'
Cc: [EMAIL PROTECTED]
Subject: R
This was posted to the same group ages ago:
if(ereg(
"^[^@ ]+@([a-zA-Z0-9\-]+\.)+([a-zA-Z0-9\-]{2}|net|com|gov|mil|org|edu|int)$"
,$email))
{
//email address is valid
}
else
{
// it ain't
}
Or something like that. I'd personally use a couple of explodes though
Ross
-Original Message-
I like Egil's idea of readable code using explode and regular
expressions. Or, you could use this function I wrote:
function isValidEmail($email) {
if(strlen($email) < 6)
return false;
$at = -1; // index of '@'
for($i=0; $i$at && $imailto:[EMAIL PROTECTED]]
Brush up on your patt
Brush up on your patternmatching then, brother. Check the php.net manual
on regexp.
If you want more readable code, try splitting the string (explode) on @
first, then split the segment after @ that you now have on . again.
Cheers,
Egil (in Norway, so I am way past bedtime myself :))
On Wed
I tried my best to find a nifty function to check for letters in a string
but with no luck, maybe the sleepnesfactor has to do with it? (it's 01:05am
here in Sweden).
I have a form that posts some text, one field is a emailadressthing, I want
to check the string that this field produces and see i
php-windows Digest 9 Apr 2002 23:02:42 - Issue 1085
Topics (messages 12979 through 12989):
Re: Rounding
12979 by: Svensson, B.A.T. (HKG)
12982 by: Mike Flynn
12986 by: Svensson, B.A.T. (HKG)
12987 by: Mike Flynn
12989 by: Ross Fleming
Session informa
Shall we settle this argument once and for all?...
The answer is
$value = round($value, 2);
Which I found after a quick look in the manual. Silly me expected the
original poster to have actually searched this far and found there WASN'T a
pre-written function.
Really irritates me that, and I'm
Hi there. I just started with php a week ago. And I have a little problem:
my system:
win 2000 professional workstation
personal web serbel installed from win cd
also IIS 5
Internet Explorer 5.5 sp2
lastest php downloaded from www.php.net
my problem.. AFTER I hit refresh button I get "The direc
At 05:49 PM 4/9/02 +0200, Svensson, B.A.T. (HKG) wrote:
>The number '2' I now have, was it - to be extreme - it '1,1' (a sealing
>function) or was it '2,9' (a floor function) before? You can never really
>tell...
If it was by the rule we've settled on below, then if you have 2, then the
number y
> Well, I suppose rounding by the dictionary's definition can mean any kind
> of approximation to a number of less significant digits, so I see your
> point.
To be a bit philosophical about it, yes. Rounding is always a matter of losing
information (e.g. precision), and you can never tell in wh
check bug fix 16435 for php in the bug database. I've encountered this
prob and it's a recurring theme but it's fixed in the Release Candidate
1 and 2 for php 4.2.have to patch the php4ts.dll and php4apache.dll
with these new ones in the RC.
bug and fix: http://bugs.php.net/bug.php?id=16435
Well, I suppose rounding by the dictionary's definition can mean any kind
of approximation to a number of less significant digits, so I see your
point. But by the popular vernacular and by the default precision for any
programming language's "round" function that I've encountered (including
P
Hey Martin,
I've got the same problem with php4.1.2 as an apache module.
As far as i could find out the whole thing depends on the php4ts.dll (using
win2k).
Probably it's a bug in 4.1.2?
fabian deutsch
"Martin Kemp" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
000801c1dfac$32985ea0$[EMAIL PROTECTE
Hi folks,
I recently wrote a website that stores session information using PHP 4.0.6
on win2k, with php as a module in apache.
However, I've just moved the same site across to another machine again using
win2k, with php as a module in apache but this time with PHP 4.1.2 and now
the session infor
> -Original Message-
> From: Mike Flynn
> Sent: Tuesday, April 09, 2002 1:30 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] Rounding
>
>
> At 09:43 PM 4/8/02 +0100, Ross Fleming wrote:
> >Multiply by 100, take the absolute value and divide by
php-windows Digest 9 Apr 2002 08:01:14 - Issue 1084
Topics (messages 12968 through 12978):
problems with imap_mail()
12968 by: Jeff Vandenberg
Rounding
12969 by: Wayne Hinch
12971 by: Ross Fleming
12974 by: Mike Flynn
12978 by: Ross Fleming
Re: mail
Absolute, round, same thing.. ;) Cheers mate
Ross
-Original Message-
From: Mike Flynn [mailto:[EMAIL PROTECTED]]
Sent: 09 April 2002 00:30
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Rounding
At 09:43 PM 4/8/02 +0100, Ross Fleming wrote:
>Multipl
18 matches
Mail list logo