On Sun, 2008-12-07 at 17:36 +1030, Michael Kubler wrote:
I agree with Nathan.
Always do server side validation, and if you have the skills, time, or
are being paid then add javascript validation to make the user
experience better.
I have a general contact form which checks the input server
I put a small one together using regular expressions,
http://www.ashleysheridan.co.uk/coding_php_validation.php
So we are regexing emails again?
#OUT OF coding_php_validation.php COPY
case 'email':
{
$expression = /^([a-z0-9_\-\.]+)@([a-z0-9_\-\.]+)\.([a-z]{2,5})$/i;
$errorText
Hi,]
So I've been thinking, because occassionally I do, about
array_reverse() and how to implement it. Of course, it's entirely
theoretical, because it would a total waste of time. But I'm wondering
which of two methods would be best.
1. Do it correctly and in place. ie, loop through the the
What about using array_pop to take the bottom array element from the
first one and add it to the second?
So basically you are feeding the 2nd array from the bottom of the 1st
one, and assuming garbage collection is done for each call of array_pop,
then you'd only need the memory usage of one
Jason Todd Slack-Moehrle wrote:
How I need to install OLE and Spreadsheet_Excel_Writer and I dont see
how
pear install .
fails every time with channel errors and not found errors.
I have downloaded the .tgz files, but I dont know where to put the
contents.
You can install them
On Sun, 2008-12-07 at 02:27 -0800, Yeti wrote:
I put a small one together using regular expressions,
http://www.ashleysheridan.co.uk/coding_php_validation.php
So we are regexing emails again?
#OUT OF coding_php_validation.php COPY
case 'email':
{
$expression =
Ashley Sheridan wrote:
On Sun, 2008-12-07 at 02:27 -0800, Yeti wrote:
I put a small one together using regular expressions,
http://www.ashleysheridan.co.uk/coding_php_validation.php
So we are regexing emails again?
#OUT OF coding_php_validation.php COPY
case 'email':
{
$expression =
/**
Validate an email address.
Provide email address (raw input)
Returns true if the email address has the email
address format and the domain exists.
Not following the usual coding style I know but I can't bring
myself to touch it... You'd better not
On Sun, Dec 7, 2008 at 8:22 AM, ioannes [EMAIL PROTECTED] wrote:
shiplu wrote:
When you are dealing with curl, anything can be done as long as its a HTTP
request.Its all about sending HTTP headers and content.
To parse HTML content you can use HTML parser. Regular expression may not
work
Hi gang:
I just interviewed for a job teaching at the local college (imagine
me taking minds of mush and molding them to the world according to
tedd -- frightening huh?)
In any event, the interviewer asked me how long I've been using MySQL
and I replied several years. After which she asked
I believe I've seen EXIST used when creating backups of tables to test for
the existence of a table and DROP it if it exists (if you select the option
to add such code in phpMyAdmin). So that would have been my answer (give
or take more specific wording for an interview).
As for
tedd wrote:
Hi gang:
I just interviewed for a job teaching at the local college (imagine me
taking minds of mush and molding them to the world according to tedd --
frightening huh?)
In any event, the interviewer asked me how long I've been using MySQL
and I replied several years. After
On Sun, Dec 7, 2008 at 10:03 AM, tedd [EMAIL PROTECTED] wrote:
Hi gang:
I just interviewed for a job teaching at the local college (imagine me
taking minds of mush and molding them to the world according to tedd --
frightening huh?)
In any event, the interviewer asked me how long I've been
Nathan Rixham wrote:
Valid email addresses according to the Multipurpose Internet Mail
Extension (MIME) [2]:
[EMAIL PROTECTED]
Ã(c)@℞.com
Uh, no, those aren't valid email address according to any standard. You
cannot have 8bit characters to the left of the @ in the email address.
The same
Per Jessen wrote:
address. The same really goes for the same on the right hand side of
the @, but some people have difficulties distinguishing between the
_actual_ email address and it may be rendered when the domain part is
converted from punycode.
That should have read and THE WAY it may
At 1:59 PM + 12/7/08, Luke Slater wrote:
/**
Validate an email address.
Provide email address (raw input)
Returns true if the email address has the email
address format and the domain exists.
Not following the usual coding style I know but I can't
Well to reproduce most of that would perhaps be fairly easy, most of it
is regex stuff.
There may be trouble with the checkdnsrr() stuff though, which is for
checking that the domain exists. I wouldn't imagine there would be
anything like that for JS... Perhaps there is...
You could always
At 3:24 PM + 12/7/08, Nathan Rixham wrote:
On the same not does anybody else frequently use (or even know
about) the awesome spatial extension for mysql? or use the
information_schema tables?
I've certainly never used them, but I can imagine information_schema
tables that are similar to
I've found a way that works for me.
Using the START SESSION on the initial form, e.g.
?php
session_start();
// store session data
$_SESSION['form'] = 1;
?
and the using the code below in the processing form.
You can do a check if the user has already submitted the from by the initial
At 5:10 PM +0100 12/7/08, Per Jessen wrote:
You cannot have 8bit characters to the left of the @ in the email address.
I'm not sure that's correct. I distinctly remember Paul Hoffman, the
director of the Internet Mail Consortium (http://www.imc.org/)
saying that the left side of the @ has
On Sun, 2008-12-07 at 13:59 +, Luke Slater wrote:
/**
Validate an email address.
Provide email address (raw input)
Returns true if the email address has the email
address format and the domain exists.
Not following the usual coding style I know but I
On Sun, 2008-12-07 at 10:03 -0500, tedd wrote:
Hi gang:
I just interviewed for a job teaching at the local college (imagine
me taking minds of mush and molding them to the world according to
tedd -- frightening huh?)
In any event, the interviewer asked me how long I've been using MySQL
On Sun, 2008-12-07 at 11:01 -0500, Eric Butera wrote:
Sounds like someone thinks they're pretty clever. I'll never
understand why interviewers want to ask really odd edge case questions
instead of ones that really show practical knowledge. I know that I
don't know the syntax to everything.
Ooh I didn't mean you actually, was taken out of a collab project I'm
working on with a.. Not so considerate... Co-worker on there called Rob.
Forgot to remove the comment =)
Ah yes didn't notice that, sorry for the labourous extra TABs and
backspaces I've put you through ;)
On Sun, 7 Dec
tedd wrote:
At 3:24 PM + 12/7/08, Nathan Rixham wrote:
On the same not does anybody else frequently use (or even know about)
the awesome spatial extension for mysql? or use the information_schema
tables?
I've certainly never used them, but I can imagine information_schema
tables that
On Sun, 2008-12-07 at 13:59 +, Luke Slater wrote:
/**
Validate an email address.
Provide email address (raw input)
Returns true if the email address has the email
address format and the domain exists.
Not following the usual coding style I know but I can't bring
On Sun, Dec 07, 2008 at 10:03:26AM -0500, tedd wrote:
Hi gang:
I just interviewed for a job teaching at the local college (imagine me
taking minds of mush and molding them to the world according to tedd
-- frightening huh?)
In any event, the interviewer asked me how long I've been using
On Sun, 2008-12-07 at 18:01 +, Nathan Rixham wrote:
On Sun, 2008-12-07 at 13:59 +, Luke Slater wrote:
/**
Validate an email address.
Provide email address (raw input)
Returns true if the email address has the email
address format and the domain exists.
Well the guy who wrote that piece of code passed away fairly recently =(
I bet he's sitting somewhere right now cursing you for pointing out that
indentation error though, haha
On Sun, 7 Dec 2008, Robert Cummings wrote:
On Sun, 2008-12-07 at 18:01 +, Nathan Rixham wrote:
On Sun,
On Sun, 2008-12-07 at 10:03 -0500, tedd wrote:
Hi gang:
I just interviewed for a job teaching at the local college (imagine
me taking minds of mush and molding them to the world according to
tedd -- frightening huh?)
In any event, the interviewer asked me how long I've been using MySQL
On Sun, 2008-12-07 at 12:38 -0500, Robert Cummings wrote:
On Sun, 2008-12-07 at 11:01 -0500, Eric Butera wrote:
Sounds like someone thinks they're pretty clever. I'll never
understand why interviewers want to ask really odd edge case questions
instead of ones that really show practical
On Sun, 2008-12-07 at 16:44 +, Bhupendra Patel wrote:
I've found a way that works for me.
Using the START SESSION on the initial form, e.g.
?php
session_start();
// store session data
$_SESSION['form'] = 1;
?
and the using the code below in the processing form.
You can do a
I think hotmail, or was it some other mail mogul, is allowing their
users to have those weird German umlauts and some accented characters.
EXAMPLE:
[EMAIL PROTECTED]
We are living in a multilingual world with dozens of alphabets.
Especiall those doing government sites should consider
Yeti wrote:
I think hotmail, or was it some other mail mogul, is allowing their
users to have those weird German umlauts and some accented characters.
EXAMPLE:
[EMAIL PROTECTED]
Anyone who allows 8-bit characters on the left side of the @ is in for
trouble. It won't work.
/Per
On Sun, 2008-12-07 at 20:31 +0100, Per Jessen wrote:
Yeti wrote:
I think hotmail, or was it some other mail mogul, is allowing their
users to have those weird German umlauts and some accented characters.
EXAMPLE:
[EMAIL PROTECTED]
Anyone who allows 8-bit characters on the left
This one time, at band camp, tedd [EMAIL PROTECTED] wrote:
In any event, the interviewer asked me how long I've been using MySQL
and I replied several years. After which she asked a single question,
which was What does EXIST mean?
I only ever use it in rollbacks to check if a table exists.
Ashley Sheridan wrote:
On Sun, 2008-12-07 at 20:31 +0100, Per Jessen wrote:
Yeti wrote:
I think hotmail, or was it some other mail mogul, is allowing their
users to have those weird German umlauts and some accented characters.
EXAMPLE:
[EMAIL PROTECTED]
Anyone who allows 8-bit characters
On Sun, 2008-12-07 at 19:54 +, Nathan Rixham wrote:
Ashley Sheridan wrote:
On Sun, 2008-12-07 at 20:31 +0100, Per Jessen wrote:
Yeti wrote:
I think hotmail, or was it some other mail mogul, is allowing their
users to have those weird German umlauts and some accented characters.
On Sun, 2008-12-07 at 15:13 -0500, Robert Cummings wrote:
On Sun, 2008-12-07 at 19:54 +, Nathan Rixham wrote:
Ashley Sheridan wrote:
On Sun, 2008-12-07 at 20:31 +0100, Per Jessen wrote:
Yeti wrote:
I think hotmail, or was it some other mail mogul, is allowing their
users to
Ashley Sheridan wrote:
On Sun, 2008-12-07 at 15:13 -0500, Robert Cummings wrote:
On Sun, 2008-12-07 at 19:54 +, Nathan Rixham wrote:
Ashley Sheridan wrote:
On Sun, 2008-12-07 at 20:31 +0100, Per Jessen wrote:
Yeti wrote:
I think hotmail, or was it
On Sun, 2008-12-07 at 20:21 +, Nathan Rixham wrote:
pessary
I had to Google that one, and wished I didn't...
Ash
www.ashleysheridan.co.uk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Kevin Waterson wrote:
Only a barbarian would call it Sequel or anything other than
My S. Q. L MY ESS KEW ELL
I have never heard that product SQL Server referred to as anything
other than seequel server.
Guess that proves your point :)
Stephen
--
PHP General Mailing List
Nathan Rixham wrote:
tedd wrote:
At 3:24 PM + 12/7/08, Nathan Rixham wrote:
On the same not does anybody else frequently use (or even know about)
the awesome spatial extension for mysql? or use the
information_schema tables?
I've certainly never used them, but I can imagine
tedd wrote:
Hi gang:
I just interviewed for a job teaching at the local college (imagine me
taking minds of mush and molding them to the world according to tedd --
frightening huh?)
In any event, the interviewer asked me how long I've been using MySQL
and I replied several years. After
Why not preg_split ( http://nz.php.net/manual/en/function.preg-split.php ):
$str = 'SCOTTSDALE, AZ 85254';
$ar = preg_split('/,? ?/', $str); //optional comma, followed by optional
space
// $ar = array('SCOTTSDALE', 'AZ', '85254');
On Sat, Dec 6, 2008 at 1:18 PM, Jason Todd Slack-Moehrle
[EMAIL
EXIST? Yeah I certainly have seen it before in the result of a mysqldump,
but from the top of my head, I probably wouldn't have known in exactly what
context it is used. I've used MySQL for 5 years now and i think if you ask
such a question, you don't know what you should be asking because the
On Mon, 2008-12-08 at 12:33 +1300, German Geek wrote:
EXIST? Yeah I certainly have seen it before in the result of a mysqldump,
but from the top of my head, I probably wouldn't have known in exactly what
context it is used. I've used MySQL for 5 years now and i think if you ask
such a
German Geek wrote:
EXIST? Yeah I certainly have seen it before in the result of a mysqldump,
but from the top of my head, I probably wouldn't have known in exactly what
context it is used. I've used MySQL for 5 years now and i think if you ask
such a question, you don't know what you should be
On Mon, Dec 8, 2008 at 2:59 PM, Chris [EMAIL PROTECTED] wrote:
German Geek wrote:
EXIST? Yeah I certainly have seen it before in the result of a mysqldump,
but from the top of my head, I probably wouldn't have known in exactly
what
context it is used. I've used MySQL for 5 years now and i
And 'exists' is not for mysqldump.
DROP TABLE IF EXISTS `mytable`;
if exists can be used in lots of places other than drop table, like
triggers, functions and i'm sure other things.
I said, I've seen EXIST in a result of a mysqldump before, which is not
wrong is it? Unless I'm
On Mon, Dec 8, 2008 at 3:24 PM, Chris [EMAIL PROTECTED] wrote:
And 'exists' is not for mysqldump.
DROP TABLE IF EXISTS `mytable`;
if exists can be used in lots of places other than drop table, like
triggers, functions and i'm sure other things.
I said, I've seen EXIST in a result
German Geek wrote:
On Mon, Dec 8, 2008 at 3:24 PM, Chris [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
And 'exists' is not for mysqldump.
DROP TABLE IF EXISTS `mytable`;
if exists can be used in lots of places other than drop table,
like triggers,
On Mon, Dec 8, 2008 at 5:06 PM, Chris [EMAIL PROTECTED] wrote:
German Geek wrote:
On Mon, Dec 8, 2008 at 3:24 PM, Chris [EMAIL PROTECTED] mailto:
[EMAIL PROTECTED] wrote:
And 'exists' is not for mysqldump.
DROP TABLE IF EXISTS `mytable`;
if exists can be used in
Sorry, I couldnt find EXIST there, only EXISTS.
If you're going to be that pedantic, exist isn't in mysqldump
either :P
I know it's pedantic, but unfortunately computers are strictly pedantic
and I wasn't sure why you said
if exists can be used in lots of places other than
On Mon, Dec 8, 2008 at 5:50 PM, Chris [EMAIL PROTECTED] wrote:
Sorry, I couldnt find EXIST there, only EXISTS.
If you're going to be that pedantic, exist isn't in mysqldump
either :P
I know it's pedantic, but unfortunately computers are strictly pedantic
and I wasn't sure
Right
So, how are these different:
SELECT * FROM t1 WHERE id EXISTS (SELECT id FROM t2)
If there are *any* results for the subselect, the exists returns true.
It's the equivalent of:
select * from t1 where id is true;
ie
select * from t1;
If there are no results for the subselect,
On Mon, Dec 8, 2008 at 7:06 PM, Chris [EMAIL PROTECTED] wrote:
Right
So, how are these different:
SELECT * FROM t1 WHERE id EXISTS (SELECT id FROM t2)
If there are *any* results for the subselect, the exists returns true.
It's the equivalent of:
select * from t1 where id is
57 matches
Mail list logo