RE: [PHP] form validation

2011-08-14 Thread Ford, Mike
-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

Re: [PHP] form validation

2011-08-14 Thread Daniel P. Brown
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

Re: [PHP] form validation

2011-08-12 Thread Daniel P. Brown
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

Re: [PHP] form validation

2011-08-12 Thread Richard Quadling
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

Re: [PHP] form validation and error display

2010-07-05 Thread David Mehler
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

Re: [PHP] form validation and error display

2010-07-05 Thread Shreyas Agasthya
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

Re: [PHP] form validation and error display

2010-07-04 Thread Shreyas Agasthya
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

Re: [PHP] form validation and error display

2010-07-04 Thread Paul M Foster
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

Re: [PHP] form validation and error display

2010-07-04 Thread David Mehler
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.

Re: [PHP] form validation and error display

2010-07-04 Thread Ashley Sheridan
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

Re: [PHP] form validation code

2010-06-30 Thread Daniel P. Brown
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

Re: [PHP] form validation code

2010-06-30 Thread Richard Quadling
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

Re: [PHP] form validation code

2010-06-30 Thread Shreyas Agasthya
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

Re: [PHP] form validation code

2010-06-30 Thread Richard Quadling
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,

RE: [PHP] Form validation and save the form

2010-01-11 Thread Angelo Zanetti
-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

Re: [PHP] Form validation and save the form

2010-01-11 Thread Robert Cummings
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 is

Re: [PHP] Form validation and save the form

2010-01-11 Thread aditya shukla
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

RE: [PHP] Form validation and save the form

2010-01-11 Thread Angelo Zanetti
-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

Re: [PHP] Form validation and save the form

2010-01-11 Thread Bastien Koert
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

Re: [PHP] Form validation and save the form

2010-01-10 Thread Paul M Foster
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

Re: [PHP] Form validation issue

2009-12-24 Thread kranthi
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

Re: [PHP] Form validation issue

2009-12-24 Thread Allen McCabe
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

Re: [PHP] Form validation issue

2009-12-24 Thread tedd
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']))

Re: [PHP] Form validation issue

2009-12-24 Thread tedd
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

Re: [PHP] Form validation issue

2009-12-21 Thread Phpster
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

Re: [PHP] Form validation issue

2009-12-21 Thread tedd
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

Re: [PHP] Form validation issue

2009-12-20 Thread Midhun Girish
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

Re: [PHP] Form Validation

2009-08-13 Thread metastable
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

Re: [PHP] Form Validation

2009-08-12 Thread Ashley Sheridan
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

Re: [PHP] Form Validation Issues

2007-05-30 Thread Richard Lynch
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

Re: [PHP] Form Validation Issues

2007-05-28 Thread Greg Donald
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

Re: [PHP] Form Validation Issues

2007-05-26 Thread David Robley
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

Re: [PHP] Form Validation Issues

2007-05-26 Thread tedd
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

Re: [PHP] Form Validation Issues

2007-05-26 Thread Jim Lucas
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

Re: [PHP] Form Validation Issues

2007-05-25 Thread tedd
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';

Re: [PHP] Form Validation Issues

2007-05-24 Thread Richard Lynch
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

Re: [PHP] Form Validation Issues

2007-05-24 Thread Richard Lynch
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' ||

Re: [PHP] Form Validation Issues

2007-05-24 Thread Robert Cummings
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' ||

Re: [PHP] Form Validation Issues

2007-05-23 Thread Robert Cummings
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

Re: [PHP] Form Validation Issues

2007-05-23 Thread Zoltán Németh
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

Re: [PHP] Form Validation Issues

2007-05-23 Thread Greg Donald
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

Re: [PHP] Form Validation Issues

2007-05-23 Thread kvigor
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

Re: [PHP] Form Validation Issues

2007-05-23 Thread Robert Cummings
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 |

Re: [PHP] Form Validation Issues

2007-05-23 Thread Robert Cummings
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 !=

Re: [PHP] Form Validation Issues

2007-05-23 Thread Greg Donald
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

Re: [PHP] Form Validation Issues

2007-05-23 Thread Jim Lucas
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' ||

Re: [PHP] Form Validation Issues

2007-05-23 Thread Robert Cummings
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.

Re: [PHP] Form Validation Issues

2007-05-23 Thread Greg Donald
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

Re: [PHP] Form Validation Issues

2007-05-23 Thread Greg Donald
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

Re: [PHP] Form Validation Issues

2007-05-23 Thread Jim Lucas
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

Re: [PHP] Form Validation Issues

2007-05-23 Thread Jim Lucas
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

Re: [PHP] Form Validation

2004-10-14 Thread Jerry Swanson
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

RE: [PHP] Form Validation

2004-10-13 Thread Pablo Gosse
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

Re: [PHP] Form Validation

2004-10-13 Thread John Nichel
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

Re: [PHP] Form Validation

2004-10-13 Thread Mattias Thorslund
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

Re: [PHP] form validation wih html input FILE

2004-05-05 Thread Richard Davey
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

Re: [PHP] form validation wih html input FILE

2004-05-05 Thread John W. Holmes
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

Re: [PHP] Form validation

2004-01-21 Thread Matt Matijevich
[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

RE: [PHP] Form validation

2004-01-21 Thread Matt Matijevich
[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

Re: [PHP] Form validation

2004-01-21 Thread zerof
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

RE: [PHP] Form validation

2004-01-21 Thread Chris W. Parker
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 =

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread David T-G
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

RE: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Mike Brum
Yes, it's considered best practice to do as much client-side validation as you can as to save your server time and load. This doesn't mean you still shouldn't do full validation on the server-side, but the fewer times the form is posted to your site the better. You might want to recheck what

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Ray Hunter
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

RE: [PHP] Form validation: client- or server-side?

2004-01-09 Thread craig
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

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Peter Vertes
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

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Chris Shiflett
--- 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.

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Peter Vertes
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

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Matt Matijevich
[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

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Chris Shiflett
--- 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

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Peter Vertes
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

RE: [PHP] Form Validation: Surnames with Apostrophe

2003-03-27 Thread tpc
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-']+/,

RE: [PHP] Form Validation: Surnames with Apostrophe

2003-03-27 Thread Jennifer Goodie
] 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

RE: [PHP] Form Validation: Surnames with Apostrophe

2003-03-27 Thread tpc
: [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

RE: [PHP] Form Validation: Surnames with Apostrophe

2003-03-27 Thread Jennifer Goodie
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

RE: [PHP] Form Validation: Surnames with Apostrophe

2003-03-27 Thread tpc
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

Re: [PHP] Form Validation: Surnames with Apostrophe

2003-03-27 Thread Andre Dubuc
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

Re: [PHP] Form Validation: Surnames with Apostrophe

2003-03-12 Thread John Nichel
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:]]+$/',

Re: [PHP] Form Validation: Surnames with Apostrophe

2003-03-12 Thread tpc
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

RE: [PHP] Form Validation: Surnames with Apostrophe

2003-03-12 Thread John W. Holmes
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:

Re: [PHP] Form validation

2002-04-26 Thread Tarjei Huse
Hi, I just thought I'd say thank's too all who responded to my question. Very good answers! I ended up using strip_tags (after someone pointed it out too me) kombinded with a couple of eregs. Tarjei John Holmes wrote: I need a function or class to validate a form with a cuple of text

Re: [PHP] Form validation

2002-04-25 Thread Philip Olson
Here are a couple resources to help your cause: http://uk.php.net/strip_tags And to get ideas on how to validate forms intelligently: http://www.zend.com/zend/spotlight/form-pro-php4.php Regards, Philip Olson On Thu, 25 Apr 2002, Tarjei Huse wrote: Hi, I need a function or

RE: [PHP] Form validation

2002-04-25 Thread SHEETS,JASON (Non-HP-Boise,ex1)
Take a look at www.hotscripts.com They probably have PHP form validiation and I know they have javascript form validation. Jason -Original Message- From: Tarjei Huse [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 1:00 PM To: [EMAIL PROTECTED] Subject: [PHP] Form validation

RE: [PHP] Form validation

2002-04-25 Thread John Holmes
I need a function or class to validate a form with a cuple of text areas that are alloed to contain a few html tags (brp etc) but not all, and I need a script to validate the input from the fields and stop the html elements that are not allowed. Does anyone have a function or class handy

Re: [PHP] Form validation

2002-04-25 Thread Justin French
Everyone on this list would write this stuff everyday. The catch is that my needs change for almost every application, so I haven't written a class as yet. However, generally, what you want to achieve can be done easily. I'd recommend you write down a list of EVERYTHING you'd like to achieve,

RE: [PHP] Form validation

2002-04-25 Thread John Holmes
I'd recommend you write down a list of EVERYTHING you'd like to achieve, and then we can help you build some code to use, or recommend a class. I'd recommend putting your validation and formatting together, too. I hate it when some people enter names into my database in all caps, and some all

RE: [PHP] Form validation

2002-04-25 Thread Miguel Cruz
On Thu, 25 Apr 2002, John Holmes wrote: I'd recommend putting your validation and formatting together, too. I hate it when some people enter names into my database in all caps, and some all lowercase. So in my validation routine, I make sure that the name is only letters, (except for a

Re: [PHP] form validation

2001-04-12 Thread Morgan Curley
?php if( $my_form_var % 50 ){ echo "$my_form_var is not a multiple of 50!"; } ? the % is the modulus operator meaning it returns the remainder of a division operation. If the number is divisible by 50 the remainder is 0 ( aka false for the if statement )

Re: [PHP] form validation

2001-04-12 Thread george
Thanks. george -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] form validation :ereg ()

2001-01-30 Thread kaab kaoutar
rington" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [PHP] form validation :ereg () Date: Mon, 29 Jan 2001 17:55:22 -0800 In article [EMAIL PROTECTED], "kaab kaoutar" [EMAIL PROTECTED] wrote: If you wish to include a hyphen in the allowed character list of a pattern match, y

Re: [PHP] form validation :ereg ()

2001-01-30 Thread kaab kaoutar
Hi! no it dose not work! now it even not accepts kaab ? for the space, what i mean is that the user won't insert space only ! From: jaydub [EMAIL PROTECTED] To: kaab kaoutar [EMAIL PROTECTED] Subject: Re: [PHP] form validation :ereg () Date: Tue, 30 Jan 2001 09:21:09 -0800 (PST) The patter

Re: [PHP] form validation :ereg ()

2001-01-29 Thread Jeff Warrington
In article [EMAIL PROTECTED], "kaab kaoutar" [EMAIL PROTECTED] wrote: If you wish to include a hyphen in the allowed character list of a pattern match, you must include it as the last character. So what you want should be more like: if (eregi("[^a-zA-Zëàéêêàäïüöûâç-]",$name)) {

Re: [PHP] form validation :ereg ()

2001-01-26 Thread Felipe Lopes
Hi! I think you u put ereg("([a-z,A-Z][ë,à]?)",$firstname) The point is the question mark "?" because it means that it's not request... Try it..I hope it will work! Felipe Lopes Em Fri, 26 Jan 2001 17:02:12 - "kaab kaoutar" Escreveu: Can u please help! well i want to