Re: [PHP] Validate if the field of a form is empty

2010-07-13 Thread te0t3l
It works fine for me, foreach ( $_FILES['archivo']['name'] as $file ) { //echo $file; } if($file == ){ echo empty; }else{ //continue... } Thanks a lot Jim! Te0

Re: [PHP] Validate if the field of a form is empty

2010-07-12 Thread Jim Lucas
te0t3l wrote: Hi, I need to validate a field that work with Multifile plugin of Jquery, I want to check if the field is empty with php. [code] input name=archivo[] class=multi type=file accept=gif|jpg|png/ input name=button type=submit value=Submit [code] I've tried different ways but

RE: [PHP] validate + if

2008-02-23 Thread Bastien Koert
From: [EMAIL PROTECTED] To: php-general@lists.php.net Date: Sat, 23 Feb 2008 16:01:08 -0300 Subject: [PHP] validate + if Hi list!I have a form. I validated it with javascript. Do the validation, but send the form information. How can I prevent send the information and stay in the

Re: [PHP] validate + if

2008-02-23 Thread Richard Lynch
If your onClick handler returns true (or is it false?) in JS, the action won't happen. Or something like that. Google for it. And you still need to validate server-side, as JS is easily bypassed. On Sat, February 23, 2008 1:01 pm, Emiliano Boragina wrote: Hi list! I have a form. I

Re: [PHP] validate international phone numbers

2004-11-02 Thread Jason Wong
On Tuesday 02 November 2004 10:49, Merlin wrote: I am trying to validate international phone numbers before adding into a db. After a bit of research I came up with this regex: return (ereg('^[0-9]{1,3}\.[0-9]{1,6}\.[0-9]{1,8}$', $phone)); However, this tightens the numbers to something like

RE: [PHP] validate international phone numbers

2004-11-02 Thread Graham Cossey
-Original Message- From: Merlin [mailto:[EMAIL PROTECTED] Sent: 02 November 2004 10:49 To: [EMAIL PROTECTED] Subject: [PHP] validate international phone numbers Hi, I am trying to validate international phone numbers before adding into a db. After a bit of research I came up

Re: [PHP] validate international phone numbers

2004-11-02 Thread Joshua D. Drake
Merlin wrote: Hi, I am trying to validate international phone numbers before adding into a db. After a bit of research I came up with this regex: return (ereg('^[0-9]{1,3}\.[0-9]{1,6}\.[0-9]{1,8}$', $phone)); However, this tightens the numbers to something like this: 409.711.933838 Thats a

Re: [PHP] validate a tag

2004-10-05 Thread Greg Donald
On Tue, 5 Oct 2004 01:59:12 -0700 (PDT), Pahlevanzadeh Mohsen [EMAIL PROTECTED] wrote: Dear,I have a input text tag that it named question. Also i have a 2 radio bottum. When i receive their value,I want to test that question tag is empty or not.If empty,I again send to client until client

Re: [PHP] Validate XML data

2004-08-19 Thread Christian Stocker
It's possible in PHP 5, but not in PHP 4 And I advise to use the most recent libxml2 libraries, since they made big improvements concerning XSD support lately chregu On Thu, 19 Aug 2004 17:11:47 +0200, Jacob Friis Larsen [EMAIL PROTECTED] wrote: It is possible to validate a XML document with

Re: [PHP] Validate XML data

2004-08-19 Thread Jacob Friis Larsen
It's possible in PHP 5, but not in PHP 4 Could you link me to the documentation? And I advise to use the most recent libxml2 libraries, since they made big improvements concerning XSD support lately It is possible to validate a XML document with XML Schema Definition Language (XSDL). Is it

Re: [PHP] Validate XML data

2004-08-19 Thread Christian Stocker
On Thu, 19 Aug 2004 18:06:27 +0200, Jacob Friis Larsen [EMAIL PROTECTED] wrote: It's possible in PHP 5, but not in PHP 4 Could you link me to the documentation? http://ch2.php.net/manual/en/function.dom-domdocument-schemavalidate.php chregu And I advise to use the most recent libxml2

Re: [PHP] validate names with regex

2003-11-12 Thread CPT John W. Holmes
From: Chris W. Parker [EMAIL PROTECTED] Can someone post a function or regex that can validate names (first and last)? The most important bit is that names like O'Malley and Hope-Jones are not barred. I use this: //allow a possible ', -, or space in name. ' will //be replaced

Re: [PHP] validate names with regex

2003-11-12 Thread Eugene Lee
On Wed, Nov 12, 2003 at 01:56:10PM -0800, Chris W. Parker wrote: : : Can someone post a function or regex that can validate names (first and : last)? The most important bit is that names like O'Malley and Hope-Jones : are not barred. The range of human names is so wide that there probably isn't

RE: [PHP] validate names with regex

2003-11-12 Thread Chris W. Parker
CPT John W. Holmes mailto:[EMAIL PROTECTED] on Wednesday, November 12, 2003 2:09 PM said: $match = ^[a-z]+([- ]{1}|(\\\'))?[a-z]+$; along with eregi(), but it can (should) be easily adapted to a syntax compatible with preg_match(). I'm wondering two things: 1. Is there a

RE: [PHP] validate names with regex

2003-11-12 Thread Chris W. Parker
Eugene Lee mailto:[EMAIL PROTECTED] on Wednesday, November 12, 2003 3:12 PM said: The range of human names is so wide that there probably isn't a way to validate names. What part of one's name do you consider valid? What part of one's name do I consider valid? Umm... probably the whole

Re: [PHP] validate names with regex

2003-11-12 Thread John W. Holmes
Chris W. Parker wrote: CPT John W. Holmes mailto:[EMAIL PROTECTED] on Wednesday, November 12, 2003 2:09 PM said: $match = ^[a-z]+([- ]{1}|(\\\'))?[a-z]+$; along with eregi(), but it can (should) be easily adapted to a syntax compatible with preg_match(). I'm wondering two things:

Re: [PHP] Validate The Last Day of Month with server's clock????

2003-08-17 Thread Nicholas Robinson
And the reason I quoted 'usual' is that my suggestion is more portable. On Thursday 14 Aug 2003 11:54 am, Ford, Mike [LSS] wrote: On 13 August 2003 20:05, Nicholas Robinson wrote: On Wednesday 13 Aug 2003 8:00 pm, Scott Fletcher wrote: Hi! Here's a trick script. We know that some

RE: [PHP] Validate The Last Day of Month with server's clock????

2003-08-17 Thread Ralph Guzman
?php // check last day of september $month = '08'; $year = date(Y); $last_day = date(t, mktime (0,0,0, $month,1,$year)); print $last_day; ? -Original Message- From: Scott Fletcher [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 13, 2003 12:00 PM To: [EMAIL PROTECTED] Subject: [PHP]

Re: [PHP] Validate The Last Day of Month with server's clock????

2003-08-14 Thread CPT John W. Holmes
From: Nicholas Robinson [EMAIL PROTECTED] The 'usual' trick is to set the date to the first day of the month after the one you want and then subtract one day. Along those same lines, this works: ?php $month = 12; $year = 2003; $last_day_of_month = mktime(12,0,0,$month+1,0,$year); echo

Re: [PHP] Validate The Last Day of Month with server's clock????

2003-08-14 Thread Scott Fletcher
Alright, interesting thought, never thought it would be possible. So, what would the PHP script be when matching it against the clock or something? Perhap mktime(). Anyone know? Scott F. Nicholas Robinson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The 'usual' trick is to set the

Re: [PHP] Validate The Last Day of Month with server's clock????

2003-08-14 Thread Scott Fletcher
Ah! that seem nicer when just using the script ($month+1)... Cpt John W. Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] From: Nicholas Robinson [EMAIL PROTECTED] The 'usual' trick is to set the date to the first day of the month after the one you want and then subtract

RE: [PHP] Validate The Last Day of Month with server's clock????

2003-08-14 Thread Ford, Mike [LSS]
On 14 August 2003 16:01, Scott Fletcher wrote: Mike Ford [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 13 August 2003 20:05, Nicholas Robinson wrote: On Wednesday 13 Aug 2003 8:00 pm, Scott Fletcher wrote: Hi! Here's a trick script. We know that some

Re: [PHP] Validate The Last Day of Month with server's clock????

2003-08-14 Thread Mike Migurski
Here's a trick script. We know that some months have the last day which is 30 while other is 31. As for February, it can be either 28 or 29. So, what's the trick in using the php to find out what is the last day of the month if you want to checked it against the server's clock to find out

RE: [PHP] Validate The Last Day of Month with server's clock????

2003-08-14 Thread Ford, Mike [LSS]
On 13 August 2003 20:05, Nicholas Robinson wrote: On Wednesday 13 Aug 2003 8:00 pm, Scott Fletcher wrote: Hi! Here's a trick script. We know that some months have the last day which is 30 while other is 31. As for February, it can be either 28 or 29. So, what's the trick in

Re: [PHP] Validate The Last Day of Month with server's clock????

2003-08-14 Thread Nicholas Robinson
The 'usual' trick is to set the date to the first day of the month after the one you want and then subtract one day. HTH Nick On Wednesday 13 Aug 2003 8:00 pm, Scott Fletcher wrote: Hi! Here's a trick script. We know that some months have the last day which is 30 while other is 31.

Re: [PHP] Validate The Last Day of Month with server's clock????

2003-08-14 Thread Scott Fletcher
True but I just only want the day date, don't want the number of seconds. Mike Ford [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 13 August 2003 20:05, Nicholas Robinson wrote: On Wednesday 13 Aug 2003 8:00 pm, Scott Fletcher wrote: Hi! Here's a trick script. We

Re: [PHP] Validate The Last Day of Month with server's clock????

2003-08-14 Thread Scott Fletcher
Did a lot of searching on the internet and found a simple PHP code that does the trick. How the code work is when you pick a month where you want the last day to be in, then use the next month into the PHP script to get the last day of the month you're looking for. --snip-- //Want to

Re: [PHP] Validate MySQL date

2003-03-31 Thread Charles Kline
try the checkdate() function. i think that will do what you need. On Monday, March 31, 2003, at 11:06 PM, Ben C. wrote: How do I easily check to see if a MySQL formatted date is valid such as if a user enters 2003/02/28 would return true 2003/02/31 would return false I have check the manual

RE: [PHP] validate date

2002-12-19 Thread Jon Haworth
Hi Diana, If a user inputs a date into a form, what function can I use to validate that he put in a valid date? You can't. Here are two dates in two different formats. Only one is valid. - 13/04/01 - 13/04/01 Can you spot which is which? I want to use checkdate but that needs the date

Re: [PHP] validate date

2002-12-19 Thread Manuel Ochoa
Here is a funtion that I use. A user can enter a date in any of the following ways: 01 01 03 01-01-03 1-1-03 01-1-2003 1-01/03 1/1 03 you get the idea... This function will standardize the date and make sure it's valid. If invalid it returns ERROR function fixdate($data){ $aux[0]=; $aux[1]=;

RE: [PHP] validate date

2002-12-19 Thread John W. Holmes
If a user inputs a date into a form, what function can I use to validate that he put in a valid date? I want to use checkdate but that needs the date split up into day, month year. Anyone have an easy way of doing this? You have to specify a date format to your users, or at least assume a

Re: [PHP] validate querystring

2002-12-11 Thread Brad Bulger
you could try doing $realfilename = realpath($fname); if (strpos($realfilename, $the_valid_path_to_my_file_directory) !== 0) { // bad file name, like /etc/passwd } elseif (is_dir($realfilename)) { // bad user looking at directory } On Thu, 12 Dec 2002, Dara Dowd wrote: Hello,

Re: [PHP] Validate CSV file With Table in Database!!

2001-09-13 Thread David Robley
On Thu, 13 Sep 2001 16:37, Coenraad Steenkamp wrote: I need to compare a csv file to a table in the database but only one field in the database with one field in the CSV file! Comparing only one field will make it much easier! When there is any change in the Database compared to the CSV file

Re: [PHP] Validate CSV file With Table in Database!!

2001-09-13 Thread David Robley
there will only be a few currency's! Thanks Coenraad Steenkamp - Original Message - From: David Robley [EMAIL PROTECTED] Newsgroups: php.general To: Coenraad Steenkamp [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, September 13, 2001 9:18 AM Subject: Re: [PHP] Validate

Re: [PHP] Validate CSV file With Table in Database!!

2001-09-13 Thread Coenraad Steenkamp
wsgroups: php.general To: Coenraad Steenkamp [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, September 13, 2001 9:18 AM Subject: Re: [PHP] Validate CSV file With Table in Database!! On Thu, 13 Sep 2001 16:37, Coenraad Steenkamp wrote: I need to compare a csv file to a table in the

Re: [PHP] Validate CSV file With Table in Database!!

2001-09-13 Thread David Robley
Thanks Coenraad Steenkamp - Original Message - From: David Robley [EMAIL PROTECTED] Newsgroups: php.general To: Coenraad Steenkamp [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, September 13, 2001 9:18 AM Subject: Re: [PHP] Validate CSV file With Table in

Re: [PHP] Validate CSV file With Table in Database!!

2001-09-13 Thread David Robley
Sorry - pressed send w/out writing anything. Topic followed up direct with problem owner. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA There are 2 ways to handle women and I know neither. --

Re: [PHP] validate phone numbers

2001-06-20 Thread Steve Werby
Richard Kurth [EMAIL PROTECTED] wrote: I am using this script to validate for phone numbers and it work just perfect for US phone numbers. But it rejects some European and Australian numbers what do I need to do to make it validate all phone numbers if (($WPHONE_NO) || ($wphone_no)) {

RE: [PHP] validate phone numbers

2001-06-20 Thread scott [gts]
...), so that you'd only have to work at validating the actual number (and not any extraneous and oddly formatted info) -Original Message- From: Steve Werby [mailto:[EMAIL PROTECTED]] Subject: Re: [PHP] validate phone numbers people enter #s in many different formats and sometimes it's

Re: [PHP] validate phone numbers

2001-06-20 Thread Miles Thompson
There are so many combinations of European phone numbers, along with the possible combinations of area codes, and hyphens or spaces may be used as well, I wouldn't bother. If the phone number is critical, and important to the person using your site, then treatitlike a password and have them

RE: [PHP] validate form with javascript

2001-05-14 Thread Sandeep Hundal
: RE: [PHP] validate form with javascript here's one that i use along with my forms you can ofcourse expand it to include all forms as long as you change the input names too hapy coding :) /sunny script language=JavaScript transmitted = 0; function formCheck

Re: [PHP] validate form with javascript

2001-05-13 Thread Steve
What is the particular error you're getting? Chris Mason [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a form in which I validate the email address using a php function then alert the operson if the email address is not correct. However, I would like

Re: [PHP] Validate forms into PHP file

2001-04-09 Thread elias
You can use JavaScript to validate the fields in a form too, would be easier. As for PHP it's too easy, you can check fields values against whatever condition. ie: if (length($password) 3) die("password too short"); -elias http://www.kameelah.org/eassoft ""Fernando Buitrago"" [EMAIL PROTECTED]