It works fine for me,
foreach ( $_FILES['archivo']['name'] as $file ) {
//echo $file;
}
if($file == ){
echo empty;
}else{
//continue...
}
Thanks a lot Jim!
Te0
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
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
Hi,
Can some body help out on how to validate user password from the database?
Thanks
Andrew
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` = ' .
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
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
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
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
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
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
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
-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
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
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.
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
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,
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 isnt complete
correctly dont send.
Thanks!
+
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
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
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
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
-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
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
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
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
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
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
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
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
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.
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
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
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
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
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:
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
?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
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
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
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
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
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
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
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
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.
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
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
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.
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
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
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
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]=;
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
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
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,
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
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
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
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
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
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.
--
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)) {
...), 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
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
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
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
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
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
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]
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
71 matches
Mail list logo