-Original Message-
From: paras...@gmail.com [mailto:paras...@gmail.com] On Behalf Of
Daniel P. Brown
Sent: 12 August 2011 16:53
On Fri, Aug 12, 2011 at 11:42, Chris Stinemetz
chrisstinem...@gmail.com wrote:
I have a select menu created by a foreach loop. I am trying to
validate
On Sun, Aug 14, 2011 at 18:19, Ford, Mike m.f...@leedsmet.ac.uk wrote:
The last part of that test is redundant, since if $_POST['market'] is
NULL isset($_POST['market'] will be FALSE.
Good catch. Didn't even notice I typed that. Not that it
would've done any damage, but a good reminder
I have a select menu created by a foreach loop. I am trying to
validate that there was a selection made before it is submitted to the
database. But I am not doing something correctly.
select name=market class=ajax
onchange=javascript:get(this.parentNode);
option value=Choose.../option
?php
On Fri, Aug 12, 2011 at 11:42, Chris Stinemetz chrisstinem...@gmail.com wrote:
I have a select menu created by a foreach loop. I am trying to
validate that there was a selection made before it is submitted to the
database. But I am not doing something correctly.
Try using a combination of
On 12 August 2011 16:42, Chris Stinemetz chrisstinem...@gmail.com wrote:
I have a select menu created by a foreach loop. I am trying to
validate that there was a selection made before it is submitted to the
database. But I am not doing something correctly.
select name=market class=ajax
Hello Everyone,
Thanks for all the suggestions on my sticky form problem. I've changed
my action attribute to empty as per the article on PHP_SELF.
I'm still having an issue getting the form to redisplay. For example,
if i don't fill out the name field how would i get the form to
redisplay with
Ash - Thanks for correcting me [should I say us ;) ]. So, if my understandng
is right, we should use # instead of the superglobal variable.
David - Sorry to have written that. I was not aware of the implications of
the grand old way of doing it. :)
Regards,
Shreyas
On Mon, Jul 5, 2010 at 4:24
Hello,
I've got a form with several required fields of different types. I
want to have the php script process it only when all the required
fields are present, and to redisplay the form with filled in values on
failure so the user won't have to fill out the whole thing again.
One of my required
David,
If I understand your problem/issue here, you are talking about something
called 'sticky forms'.
This means -
(i) the form references itself.
(ii) that the form knows what the previous data was when it encounters any
validation issues.
You achieve (i) and (ii) by re-submitting the form
On Sun, Jul 04, 2010 at 01:57:01PM -0400, David Mehler wrote:
Hello,
I've got a form with several required fields of different types. I
want to have the php script process it only when all the required
fields are present, and to redisplay the form with filled in values on
failure so the user
Hello everyone,
Thanks for your suggestions.
For my variable in the value area of the text input field I enter
value=?php echo $name; ?
Prior to this I assign the variable $name to:
$name = stripslashes($_POST['name']);
I hope this is correct.
Sticky forms sounds exactly what i'm looking for.
On Sun, 2010-07-04 at 18:23 -0400, David Mehler wrote:
Hello everyone,
Thanks for your suggestions.
For my variable in the value area of the text input field I enter
value=?php echo $name; ?
Prior to this I assign the variable $name to:
$name = stripslashes($_POST['name']);
I hope
Hello,
I've been looking at this to long, and am not seeing the issue. When i
had the below php code set to !empty instead of !isset as it is now I
got the value of the name variable echoed back, yet on sql insert that
field, along with all others are empty, though no error is generated,
just a
On Wed, Jun 30, 2010 at 09:07, David Mehler dave.meh...@gmail.com wrote:
Hello,
I've been looking at this to long, and am not seeing the issue. When i
had the below php code set to !empty instead of !isset as it is now I
got the value of the name variable echoed back, yet on sql insert that
On 30 June 2010 14:23, Daniel P. Brown daniel.br...@parasane.net wrote:
(Hint: isset != empty)
More importantly ...
isset != !empty
$a = Null;
$b = '';
// $c = undefined;
$d = 'Hello';
isset($a) = False vs True = empty($a)
isset($b) = True vs True = empty($b)
isset($c) = False vs True
http://www.php.net/manual/en/types.comparisons.php
http://www.php.net/manual/en/types.comparisons.phpThe first table actually
gives a very good understanding.
--Shreyas
On Wed, Jun 30, 2010 at 7:05 PM, Richard Quadling rquadl...@gmail.comwrote:
On 30 June 2010 14:23, Daniel P. Brown
On 30 June 2010 14:53, Shreyas Agasthya shreya...@gmail.com wrote:
http://www.php.net/manual/en/types.comparisons.php
The first table actually gives a very good understanding.
--Shreyas
On Wed, Jun 30, 2010 at 7:05 PM, Richard Quadling rquadl...@gmail.com
wrote:
On 30 June 2010 14:23,
-Original Message-
From: aditya shukla [mailto:adityashukla1...@gmail.com]
Sent: 11 January 2010 07:37 AM
To: php-general
Subject: [PHP] Form validation and save the form
Hello Guys,
I am trying to validate a form for user input , such that when something is
missing load the form
Angelo Zanetti wrote:
-Original Message-
From: aditya shukla [mailto:adityashukla1...@gmail.com]
Sent: 11 January 2010 07:37 AM
To: php-general
Subject: [PHP] Form validation and save the form
Hello Guys,
I am trying to validate a form for user input , such that when something
Thanks for the reply guys.Do you guys know a good resource where i can read
from about form validation through PHP.There a lot on google but please
suggest something if you guys know.
Thanks
Aditya
-Original Message-
From: aditya shukla [mailto:adityashukla1...@gmail.com]
Sent: 11 January 2010 05:03 PM
To: Robert Cummings
Cc: Angelo Zanetti; php-general
Subject: Re: [PHP] Form validation and save the form
Thanks for the reply guys.Do you guys know a good resource where i can read
On Mon, Jan 11, 2010 at 10:18 AM, Angelo Zanetti ang...@zlogic.co.za wrote:
-Original Message-
From: aditya shukla [mailto:adityashukla1...@gmail.com]
Sent: 11 January 2010 05:03 PM
To: Robert Cummings
Cc: Angelo Zanetti; php-general
Subject: Re: [PHP] Form validation and save
Hello Guys,
I am trying to validate a form for user input , such that when something is
missing load the form again by focusing on the wrong field.Say i don not
enter my address so when the form loads everything else is saved and the
form points to address field.
Thanks
Aditya
On Sun, Jan 10, 2010 at 11:37:06PM -0600, aditya shukla wrote:
Hello Guys,
I am trying to validate a form for user input , such that when something is
missing load the form again by focusing on the wrong field.Say i don not
enter my address so when the form loads everything else is saved
The javascript function formValidator() must return false if any
errors are formed.
The PHP only runs if the fields are set by testing using ‘isset”.
You should definitely have a better validation than that. Remember
that all users dont have javascript enabled. Moreover it is very easy
to modify
Tedd,
If you are using a post method using $_SERVER['PHP_SELF'], then values are
present in the POST array, hence, you would write your html with
interspersed php like so:
input type=text name=username value=?php if
(isset($_POST['username'])) echo $_POST['username'] ? id=username /
I sometimes
At 2:22 AM -0800 12/24/09, Allen McCabe wrote:
Tedd,
If you are using a post method using $_SERVER['PHP_SELF'], then
values are present in the POST array, hence, you would write your
html with interspersed php like so:
input type=text name=username value=?php if
(isset($_POST['username']))
At 3:10 PM +0530 12/24/09, kranthi wrote:
The javascript function formValidator() must return false if any
errors are formed.
The PHP only runs if the fields are set by testing using 'isset.
You should definitely have a better validation than that. Remember
that all users dont have javascript
Does the js function return false on the errors to block the submission?
Bastien
Sent from my iPod
On Dec 20, 2009, at 9:43 PM, Ernie Kemp ernie.k...@sympatico.ca
wrote:
Good Day,
I need help in in validating a form.
The for is valdated be a javascript
At 9:43 PM -0500 12/20/09, Ernie Kemp wrote:
Good Day,
I need help in in validating a form.
The for is valdated be a javascript frist then if
all the fields are filled in its valaded be PHP.
The Form starts with:
form
Good Day,
I need help in in validating a form.
The for is valdated be a javascript frist then if all the
fields are filled in its valaded be PHP.
The Form starts with:
form name=myForm action=?php echo
then the page gets reloaded and clears all the javascript error messages
and does the PHP validation.
That is because the form is getting submitted... make sure you js code
prevents form submit if errors are found
Midhun Girish
On Mon, Dec 21, 2009 at 8:13 AM, Ernie Kemp
Morning All,
I've been figthing with this little problem for two days now, so far no luck
with google and am beginning to question my own sanity.
I have a application that has over one hundred forms some quite lengthy so
what I'm trying to achieve rather than writing a bunch of individual
Ashley Sheridan wrote:
On Wed, 2009-08-12 at 12:21 -0400, Micheleh Davis wrote:
Please help. My form validation worked fine until I added the terms check
at the bottom. Any ideas?
//form validation step one
function validateStep1(myForm){
// list of required
Please help. My form validation worked fine until I added the terms check
at the bottom. Any ideas?
//form validation step one
function validateStep1(myForm){
// list of required fields
with (myForm) {
var requiredFields =
On Wed, 2009-08-12 at 12:21 -0400, Micheleh Davis wrote:
Please help. My form validation worked fine until I added the terms check
at the bottom. Any ideas?
//form validation step one
function validateStep1(myForm){
// list of required fields
i need to validate a field in a form where a user enters a reference number
this can be letters, numbers and special characters also so i have not
written any special preg match as the username is a combination. the only
check i am doing is if there are any white spaces and if a user simple
hi
i need to validate a field in a form where a user enters their lodgement
number as part of a registration form. this lodgement number can have
letters, numbers, spaces and special characters. i do not know exactly what
those special characters are, so do i have to define the type of special
Hi,
Being thrust into cleaning after another has me timid. Could some
kind soul look over the following solution for form validation and DB
query? Any suggestions on security and streamlining is humbly requested.
CK
?php
$firstname =$_POST['firstname'];
$lastname =
On Tue, May 29, 2007 12:05 am, Greg Donald wrote:
On 5/24/07, Robert Cummings [EMAIL PROTECTED] wrote:
*lol* You must have missed the other thread... hence the wink on the
end :)
I'm guessing not everyone uses a threaded email client. And some
people always feel the need to post their
On 5/24/07, Robert Cummings [EMAIL PROTECTED] wrote:
*lol* You must have missed the other thread... hence the wink on the
end :)
I'm guessing not everyone uses a threaded email client. And some
people always feel the need to post their 'thoughts' no matter how
well the question has already
tedd wrote:
SNIP on topic stuff
Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them.
Unknown
Hi Jim:
You might try the array below and the quote above, I believe, was
Douglas MacArthur of WWII fame.
Is that the same Douglas
tedd wrote:
SNIP on topic stuff
Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them.
Unknown
Hi Jim:
You might try the array below and the quote above, I believe, was
Douglas MacArthur of WWII fame.
Is that the same Douglas
tedd wrote:
tedd wrote:
SNIP on topic stuff
Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them.
Unknown
Hi Jim:
You might try the array below and the quote above, I believe, was
Douglas MacArthur of WWII fame.
Is that the
At 8:57 AM -0700 5/23/07, Jim Lucas wrote:
kvigor wrote:
if($value != 'Alabama' || $value!= 'AL' || $value != 'Alaska' ||
$value!= 'AK' || $value !=
-snip-
Ok, here is something that might help you.
$states['AL'] = 'Alabama';
$states['AK'] = 'Alaska';
-snip-
$states['WY'] = 'Wyoming';
On Wed, May 23, 2007 7:41 am, kvigor wrote:
if($value != 'Alabama' || $value!= 'AL' || $value != 'Alaska' ||
This mess will *ALWAYS* evaluate to TRUE, because the $value is ALWAYS
only one value, and thus the other 99 values are going to evaluate to
TRUE and you have || between them...
So
On Wed, May 23, 2007 10:48 am, Robert Cummings wrote:
On Wed, 2007-05-23 at 10:10 -0500, Greg Donald wrote:
On 5/23/07, kvigor [EMAIL PROTECTED] wrote:
[-- SNIPPITY SNIP SNIP --]
!= 'Texas' || $value!= 'TX' || $value != 'Utah' || $value!= 'UT'
|| $value
!= 'Vermont' || $value!= 'VT' ||
On Thu, 2007-05-24 at 17:58 -0500, Richard Lynch wrote:
On Wed, May 23, 2007 10:48 am, Robert Cummings wrote:
On Wed, 2007-05-23 at 10:10 -0500, Greg Donald wrote:
On 5/23/07, kvigor [EMAIL PROTECTED] wrote:
[-- SNIPPITY SNIP SNIP --]
!= 'Texas' || $value!= 'TX' || $value != 'Utah' ||
On Wed, 2007-05-23 at 07:41 -0500, kvigor wrote:
if($field == conState || $field == schState || $field == strState)
//if these 3 fields are entered
{
if($value != 'Alabama' || $value!= 'AL' || $value != 'Alaska' || $value!=
'AK' || $value != 'Arizona' || $value!= 'AZ' || $value
2007. 05. 23, szerda keltezéssel 07.41-kor kvigor ezt írta:
Hi,
I have an issue with a particular if statement when I check 3 form fields
for their value. The problem is no matter what input is entered in the
fields the output is the same. I only added the 3 fields in question of the
On 5/23/07, kvigor [EMAIL PROTECTED] wrote:
The code is:
?php
$label_array = array (conName = Consumer Name,
conAddress = Consumer Address,
conCity = Consumer City,
conState = Consumer State,
conZip = Consumer Zip Code,
conPhone = Consumer Phone,
schName = School
Thanks Dan,
Work like a dream. I solute you.
Daniel Brown [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On 5/23/07, kvigor [EMAIL PROTECTED] wrote:
Hi,
I have an issue with a particular if statement when I check 3 form fields
for their value. The problem is no matter what
On Wed, 2007-05-23 at 10:17 -0500, kvigor wrote:
Thanks Dan,
Work like a dream. I solute you.
Don't look now Dan... but you're dissolving!!! *hehe*
Cheers,
Rob.
--
..
| InterJinn Application Framework - http://www.interjinn.com |
On Wed, 2007-05-23 at 10:10 -0500, Greg Donald wrote:
On 5/23/07, kvigor [EMAIL PROTECTED] wrote:
[-- SNIPPITY SNIP SNIP --]
!= 'Texas' || $value!= 'TX' || $value != 'Utah' || $value!= 'UT' || $value
!= 'Vermont' || $value!= 'VT' || $value != 'Virginia' || $value!= 'VA' ||
$value !=
On 5/23/07, Robert Cummings [EMAIL PROTECTED] wrote:
You should really look into learning in_array() for stuff like this.
Wouldn't that slow things down and increase the memory footprint? ;)
It'd be interesting to see a benchmark.
--
Greg Donald
http://destiney.com/
--
PHP General Mailing
kvigor wrote:
if($value != 'Alabama' || $value!= 'AL' || $value != 'Alaska' || $value!=
'AK' || $value != 'Arizona' || $value!= 'AZ' || $value != 'Arkansas' ||
$value!= 'AR' || $value != 'California' || $value!= 'CA' || $value !=
'Colorado' || $value!= 'CO' || $value != 'Conneticut' ||
On Wed, 2007-05-23 at 10:55 -0500, Greg Donald wrote:
On 5/23/07, Robert Cummings [EMAIL PROTECTED] wrote:
You should really look into learning in_array() for stuff like this.
Wouldn't that slow things down and increase the memory footprint? ;)
It'd be interesting to see a benchmark.
On 5/23/07, Jim Lucas [EMAIL PROTECTED] wrote:
$states['TN'] = 'Tennesee';
:%s/Tennesee/Tennessee/
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 5/23/07, Jim Lucas [EMAIL PROTECTED] wrote:
Ok, here is something that might help you.
$states['AL'] = 'Alabama';
$states['AK'] = 'Alaska';
And a little something for you as well:
:%s/=/=/g
--
Greg Donald
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To
Greg Donald wrote:
On 5/23/07, Jim Lucas [EMAIL PROTECTED] wrote:
Ok, here is something that might help you.
$states['AL'] = 'Alabama';
$states['AK'] = 'Alaska';
And a little something for you as well:
:%s/=/=/g
oops, did over look that one
--
Jim Lucas
Some men are born to
Greg Donald wrote:
On 5/23/07, Jim Lucas [EMAIL PROTECTED] wrote:
$states['TN'] = 'Tennesee';
:%s/Tennesee/Tennessee/
Not my typo, this was the ops list just reformatted.
--
Jim Lucas
Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon
I''ve tried !preg_match and !eregi to validate my form. I get back whatever the
user inputs into the textboxes. I would like to validate each textbox before
submitting and redirect the user after submission? Here's part of the code
?php // Script 1 handle .html
// Should accept First
I found the error in my previous question about parse just a simple ; at the
end.
I'm trying to validate some textfields especially name fields and email
addresses. I'm having a little trouble writing the code using classes and
regular expressions? I would like to validate the input from
On what percent browsers Javascript is enabled?
On Wed, 13 Oct 2004 15:48:51 -0700, Mattias Thorslund
[EMAIL PROTECTED] wrote:
There are several JavaScript solutions for validating forms on the
client side. Search on hotscripts.com and google.com.
Client-side validation (in the browser) is
I am currently working on a newsletter mailing list project and
developed a form in php. I would like to validate before it is
submitted. What would be the best way to validate a form? Write your own
routines or using a form validator. I just started learning PHP, so
don't have much experience on
Huang, Ou wrote:
I am currently working on a newsletter mailing list project and
developed a form in php. I would like to validate before it is
submitted. What would be the best way to validate a form? Write your
own routines or using a form validator. I just started learning PHP,
so don't
Huang, Ou wrote:
I am currently working on a newsletter mailing list project and
developed a form in php. I would like to validate before it is
submitted. What would be the best way to validate a form? Write your own
routines or using a form validator. I just started learning PHP, so
don't have
There are several JavaScript solutions for validating forms on the
client side. Search on hotscripts.com and google.com.
Client-side validation (in the browser) is useful, but you shouldn't
depend on it to guarantee that the data that your users submit is
valid. You should also validate the
Hi,
I'd like your opinion on the best way to do a form validation when the form contains a
file upload object (input type=file)
When the form does not validate, I try to re-show all values entered by the user.
But, as far as I know, browsers do not allow to set the default value (local file
Hello Vincent,
Wednesday, May 5, 2004, 2:26:44 PM, you wrote:
VD Will I be limited to display a warning message indicating
VD that the user will have to select his/her file again??
Pretty much, yes. Or you could do what I do - store the file in a
temporary folder, passing the filename back to
From: Vincent DUPONT [EMAIL PROTECTED]
I'd like your opinion on the best way to do a form
validation when the form contains a file upload object
(input type=file)
When the form does not validate, I try to re-show all values
entered by the user.But, as far as I know, browsers do not
allow
Can some one point me in the right direction for a good tutorial on form
validation in PHP?
Thanks,
alex hogan
**
The contents of this e-mail and any files transmitted with it are
confidential and intended solely for
[snip]
Can some one point me in the right direction for a good tutorial on
form
validation in PHP?
Thanks,
alex hogan
[/snip]
I like to use regular expressions for my form validation. Search
google for reugular expressions, you will get a bunch of results. Also
take a look at the php
[snip]
Hi,
you can do it on server site (php code) or client side (javascript
code)
DS
[/snip]
Is this a question? If it is, yes you can use regular expressions with
javascript and php.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
If you can use Dreamweaver, there is an extension to do this.
zerof
-
Matt Matijevich [EMAIL PROTECTED] escreveu na mensagem
news:[EMAIL PROTECTED]
Can some one point me in the right direction for a good tutorial on
form validation in PHP?
---
--
PHP General Mailing List
Alex Hogan mailto:[EMAIL PROTECTED]
on Wednesday, January 21, 2004 7:18 AM said:
Can some one point me in the right direction for a good tutorial on
form validation in PHP?
Here is a basic practical application.
?php
// gather and validate data
$fname =
Is there a distinct advantage to doing form validation / error checking on
the server side using PHP? That's how I've always done it because I know
PHP better than JavaScript, but wouldn't it make sense to validate as much
of your form as possible using JavaScript before the form was ever posted?
Matt --
...and then Matt Grimm said...
%
% Is there a distinct advantage to doing form validation / error checking on
% the server side using PHP? That's how I've always done it because I know
1) I hate JavaScript.
2) Don't trust anything coming from a client.
You should be validating on the
Javascript can do now - it's pretty extensive
for a client-side scripting language.
-M
-Original Message-
From: Matt Grimm [mailto:[EMAIL PROTECTED]
Sent: Friday, January 09, 2004 1:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Form validation: client- or server-side?
Is there a distinct
On Fri, 2004-01-09 at 11:07, Matt Grimm wrote:
Is there a distinct advantage to doing form validation / error checking on
the server side using PHP? That's how I've always done it because I know
PHP better than JavaScript, but wouldn't it make sense to validate as much
of your form as
Is there a distinct advantage to doing form validation /
error checking on
the server side using PHP?
The actual code you use to validate remains hidden from a potential
malicious user, while javascript code can be seen, so if there is a
hole in your error checking, it can be found easier.
The
On Fri, 2004-01-09 at 13:07, Matt Grimm wrote:
Is there a distinct advantage to doing form validation / error checking on
the server side using PHP? That's how I've always done it because I know
PHP better than _javascript_, but wouldn't it make sense to validate as much
of your form as
--- Matt Grimm [EMAIL PROTECTED] wrote:
Is there a distinct advantage to doing form validation / error checking
on the server side using PHP?
Yes, security.
Basically, I never think of it as client-side *versus* server-side. I
think of it more like this:
1. Server-side data validation? YES
2.
On Fri, 2004-01-09 at 14:22, Chris Shiflett wrote:
But, no matter what, always validate data on the server. Otherwise, it's
like being a teacher and having your students grade their own work; it
only works when everyone is honest (and I can guarantee you that won't be
the case on a public Web
[snip]
why would you validate data on the server
if you have a JavaScript that checked the user's input before it gets
submitted to the server ? I mean the whole point of you having that
JavaScript is to make sure the the correct data gets entered so why
bother checking it once again on the
--- Peter Vertes [EMAIL PROTECTED] wrote:
Just to play devil's advocate; why would you validate data on the
server if you have a JavaScript that checked the user's input before
it gets submitted to the server? I mean the whole point of you having
that JavaScript is to make sure the the correct
It makes perfect sense now. Thanks for clearing it up for me Chris :)
-Peter
On Fri, 2004-01-09 at 15:29, Chris Shiflett wrote:
--- Peter Vertes [EMAIL PROTECTED] wrote:
Just to play devil's advocate; why would you validate data on the
server if you have a _javascript_ that checked the
I just tried your regexp:
(preg_match(/[a-z](\\')?[a-z-]+/i,$_POST[Last_Name])
and it allows the following:
O' [EMAIL PROTECTED]
It seems to allow any number of characters and spaces between the O' and
Re
On Wed, 12 Mar 2003, John W. Holmes wrote:
preg_match ( /[A-Za-z-']+/,
]
Sent: Thursday, March 27, 2003 1:19 PM
To: John W. Holmes
Cc: 'John Nichel'; [EMAIL PROTECTED]
Subject: RE: [PHP] Form Validation: Surnames with Apostrophe
I just tried your regexp:
(preg_match(/[a-z](\\')?[a-z-]+/i,$_POST[Last_Name])
and it allows the following:
O' [EMAIL PROTECTED
: [PHP] Form Validation: Surnames with Apostrophe
I just tried your regexp:
(preg_match(/[a-z](\\')?[a-z-]+/i,$_POST[Last_Name])
and it allows the following:
O' [EMAIL PROTECTED]
It seems to allow any number of characters and spaces between the O' and
Re
On Wed, 12 Mar 2003, John W
that to the end of their name.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 27, 2003 3:05 PM
To: Jennifer Goodie
Cc: John W. Holmes; 'John Nichel'; [EMAIL PROTECTED]
Subject: RE: [PHP] Form Validation: Surnames with Apostrophe
When I do
Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 27, 2003 3:05 PM
To: Jennifer Goodie
Cc: John W. Holmes; 'John Nichel'; [EMAIL PROTECTED]
Subject: RE: [PHP] Form Validation: Surnames with Apostrophe
When I do that:
(preg_match(/^[a-z](\\')?[a-z-]+$/i
To: John W. Holmes
Cc: 'John Nichel'; [EMAIL PROTECTED]
Subject: RE: [PHP] Form Validation: Surnames with Apostrophe
I just tried your regexp:
(preg_match(/[a-z](\\')?[a-z-]+/i,$_POST[Last_Name])
and it allows the following:
O' [EMAIL PROTECTED]
It seems to allow
I have been trying to validate a form field Last_Name and have been unable
to find a regexp to account for the apostrophe (e.g., O'Reilly). The
following statement:
preg_match('/^[[:alpha:]]+[-]?[[:alpha:]]+$/', $_POST[Last_Name])
accepts hyphenated surnames and I have tried escaping the
Try
preg_match ( /[A-Za-z-']+/, $_POST['Last_Name'] );
[EMAIL PROTECTED] wrote:
I have been trying to validate a form field Last_Name and have been unable
to find a regexp to account for the apostrophe (e.g., O'Reilly). The
following statement:
preg_match('/^[[:alpha:]]+[-]?[[:alpha:]]+$/',
that could work but the user may now submit one or more apostrophes
as the Last Name.
On Wed, 12 Mar 2003, John Nichel wrote:
Try
preg_match ( /[A-Za-z-']+/, $_POST['Last_Name'] );
[EMAIL PROTECTED] wrote:
I have been trying to validate a form field Last_Name and have been unable
preg_match ( /[A-Za-z-']+/, $_POST['Last_Name'] );
[EMAIL PROTECTED] wrote:
I have been trying to validate a form field Last_Name and have
been
unable
to find a regexp to account for the apostrophe (e.g., O'Reilly).
The
following statement:
I am *very* new to PHP am trying to write a tool where a user can add books to a
library MySQL database.
The user fills out an HTML form. I do some form validation if the form entries are
ok, I need to run some SQL queries using the form variables.
I have the HTML form posting back to
I included a pseudocode form of my logic here my actual code below.
A suggestion in similar pseudo code.
top of page
set a flag to display form
If (form submitted)
{
validate entered data
if (data is correctly validated)
{
enter data into database
if (database
PROTECTED]]
Sent: Saturday, June 01, 2002 5:11 PM
To: [EMAIL PROTECTED]
Subject: [PHP] New to PHP- Form Validation Logic/Design Question
I am *very* new to PHP am trying to write a tool where a user can
add
books to a library MySQL database.
The user fills out an HTML form. I do some form
1 - 100 of 118 matches
Mail list logo