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

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

2010-07-12 Thread te0t3l
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 it does not work: for

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

[PHP] [PHP]: php validate user password

2009-02-09 Thread Andrew Williams
Hi, Can some body help out on how to validate user password from the database? Thanks Andrew

Re: [PHP] [PHP]: php validate user password

2009-02-09 Thread Jan G.B.
2009/2/9 Andrew Williams andrew4willi...@gmail.com: Hi, Hi, Can some body help out on how to validate user password from the database? There are several possibilities. This would be one. ? $query = 'SELECT 1 from `usertable` where `name` = ' .

[PHP] php validate user password

2009-02-09 Thread Michael Kubler
These days SHA should really be used instead of MD5, and you should be SALTing the password as well. Here's a great guide : http://phpsec.org/articles/2005/password-hashing.html Michael Kubler *G*rey *P*hoenix *P*roductions http://www.greyphoenix.biz Jan G.B. wrote: 2009/2/9 Andrew Williams

Re: [PHP] php validate user password

2009-02-09 Thread Stuart
2009/2/9 Michael Kubler mdk...@gmail.com: These days SHA should really be used instead of MD5, and you should be SALTing the password as well. Here's a great guide : http://phpsec.org/articles/2005/password-hashing.html Good advice. I would also advise against stripping and trimming anything

Re: [PHP] php validate user password

2009-02-09 Thread Jan G.B.
2009/2/9 Stuart stut...@gmail.com: 2009/2/9 Michael Kubler mdk...@gmail.com: These days SHA should really be used instead of MD5, and you should be SALTing the password as well. Here's a great guide : http://phpsec.org/articles/2005/password-hashing.html Good advice. Absolutley. I used

Re: [PHP] php validate user password

2009-02-09 Thread Stuart
2009/2/9 Jan G.B. ro0ot.w...@googlemail.com: 2009/2/9 Stuart stut...@gmail.com: I would also advise against stripping and trimming anything from passwords. By removing characters you're significantly reducing the number of possible passwords. Surely, the stripping should only be done when

Re: [PHP] php validate user password

2009-02-09 Thread tedd
At 2:02 PM + 2/9/09, Stuart wrote: 2009/2/9 Michael Kubler mdk...@gmail.com: These days SHA should really be used instead of MD5, and you should be SALTing the password as well. Here's a great guide : http://phpsec.org/articles/2005/password-hashing.html Good advice. I would also

Re: [PHP] php validate user password

2009-02-09 Thread Bruno Fajardo
tedd, I think that the problem of the duplicated hashes in the database (in the case of two users using the same password) persists with a constant prefix in the passwords. Although the random salt portion get stored in the database concatenated to the hash, the attacker don't know the string

Re: [PHP] php validate user password

2009-02-09 Thread tedd
At 12:20 PM -0300 2/9/09, Bruno Fajardo wrote: tedd, I think that the problem of the duplicated hashes in the database (in the case of two users using the same password) persists with a constant prefix in the passwords. Although the random salt portion get stored in the database concatenated to

RE: [PHP] php validate user password

2009-02-09 Thread Boyd, Todd M.
-Original Message- From: tedd [mailto:tedd.sperl...@gmail.com] Sent: Monday, February 09, 2009 10:30 AM To: Bruno Fajardo Cc: PHP General Subject: Re: [PHP] php validate user password At 12:20 PM -0300 2/9/09, Bruno Fajardo wrote: tedd, I think that the problem

RE: [PHP] php validate user password

2009-02-09 Thread tedd
At 10:41 AM -0600 2/9/09, Boyd, Todd M. wrote: -Original Message- From: tedd [mailto:tedd.sperl...@gmail.com] Granted, there are things here that are above my head -- I am not passing myself off as an expert but rather as someone proposing ideas to see if they pass or fail. I

Re: [PHP] php validate user password

2009-02-09 Thread Jan G.B.
2009/2/9 Stuart stut...@gmail.com: 2009/2/9 Jan G.B. ro0ot.w...@googlemail.com: 2009/2/9 Stuart stut...@gmail.com: I would also advise against stripping and trimming anything from passwords. Trimming could be left out but it minimizes user errors and users pretending to know their password.

Re: [PHP] php validate user password

2009-02-09 Thread Micah Gersten
onlist this time... tedd wrote: snip I think the MD5() hash is a pretty good way and if the weakness is the user's lack of uniqueness in determining their passwords, then we can focus on that problem instead of looking to another hash. And besides, the solution presented was to

Re: [PHP] php validate user password

2009-02-09 Thread Bruno Fajardo
Or, like the article suggested, a random portion for the hash... I agree with you, Micah. The hash collision is a problem, and must be avoided. Same password hashes for different users are very good candidates for a dictionary attack. Probably, in most of this cases, users picked easy passwords,

[PHP] validate + if

2008-02-23 Thread Emiliano Boragina
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 form? When validate all correctly send the info, but if the form isn’t complete correctly don’t send. Thanks! +

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

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

[PHP] validate international phone numbers

2004-11-02 Thread Merlin
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 problem, since some

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

[PHP] validate a tag

2004-10-05 Thread Pahlevanzadeh Mohsen
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 fill out this tag. Can u solve my problem? ?php function display_form() { echo form

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

[PHP] Validate XML data

2004-08-19 Thread Jacob Friis Larsen
It is possible to validate a XML document with XML Schema Definition Language (XSDL). Is it possible to use XSDL in Php? Thanks, Jacob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

[PHP] validate names with regex

2003-11-12 Thread Chris W. Parker
Hey all. I tried googling for this AND looking in the archives with no luck. 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. Hopefully I haven't been too brief with my request.

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

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

2003-08-14 Thread Scott Fletcher
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 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

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

[PHP] Validate MySQL date

2003-03-31 Thread Ben C.
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 and other resources but can't come up with anything.

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

[PHP] validate date

2002-12-19 Thread Diana Castillo
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? Thanks, Diana -- PHP General Mailing List (http://www.php.net/) To

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

[PHP] validate querystring

2002-12-11 Thread Dara Dowd
Hello, I have a query string like this http://server/download.php?fname=name_of_remote_file. The script runs and displays a file download dialog box. Is there a way of validating the querystring to ensure that a user doesn't try something like fname=. or fname=.. or fname=? or fname=/, which

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,

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

2001-09-13 Thread Coenraad Steenkamp
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 , the database must then be updated or if there are no

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

[PHP] validate phone numbers

2001-06-19 Thread Richard Kurth
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)) { $wphone_no = trim($wphone_no); if

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

[PHP] validate form with javascript

2001-05-13 Thread Chris Mason
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 to pop up an alert with javascript if the email field is left blank. I am using the function below but it down't work with php, probably works

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]

[PHP] Validate forms into PHP file

2001-04-08 Thread Fernando Buitrago
Hi. Tell me the steps to validate field's forms in the same PHP file, before to send the result to another file. Regards -- 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