Re: multiple parameters in if statement

2006-04-16 Thread John Machin
On 17/04/2006 5:13 AM, John Zenger top-posted: > Yup, join is better. The problem with using form.values() is that it > will break if the HTML changes and adds some sort of new field that this > function does not care about, or if an attacker introduces bogus fields > into his query. If one is

Re: multiple parameters in if statement

2006-04-16 Thread John Zenger
Yup, join is better. The problem with using form.values() is that it will break if the HTML changes and adds some sort of new field that this function does not care about, or if an attacker introduces bogus fields into his query. John Machin wrote: > On 16/04/2006 1:43 PM, John Zenger wrote: >

Re: multiple parameters in if statement...

2006-04-16 Thread Peter Otten
Kun wrote: > [EMAIL PROTECTED] wrote: >> Kun wrote: >>> I am trying to make an if-statement that will not do anything and print >>> 'nothing entered' if there is nothing entered in a form. I have the >>> following code that does that, however, now even if I enter something >> >> Yes, but did you

Re: multiple parameters in if statement

2006-04-16 Thread John Machin
On 16/04/2006 1:43 PM, John Zenger wrote: > > The other thing I'd recommend is stick that long list of fields in a > list, and then do operations on that list: > > fields = ['delete_id', 'delete_date', 'delete_purchasetype', > 'delete_price', 'delete_comment'] > > then to see if all those fiel

Re: multiple parameters in if statement

2006-04-15 Thread John Zenger
Try this: if form.get("delete_id","") != "" and form.get("delete_data","") != "" and... the "get" method lets you have an optional second argument that gets returned if the key is not in the dictionary. Also, am I reading your code right? If I enter some fields but not all, you print a messa

Re: multiple parameters in if statement

2006-04-15 Thread John Machin
On 16/04/2006 10:28 AM, Kun wrote: > I am trying to make an if-statement that will not do anything and print > 'nothing entered' if there is nothing entered in a form. I have the > following code that does that, however, now even if I enter something > into the form, the code still outputs 'not

Re: multiple parameters in if statement

2006-04-15 Thread Steven D'Aprano
On Sat, 15 Apr 2006 20:28:47 -0400, Kun wrote: > I am trying to make an if-statement that will not do anything and print > 'nothing entered' if there is nothing entered in a form. I have the > following code that does that, however, now even if I enter something > into the form, the code still

Re: multiple parameters in if statement...

2006-04-15 Thread Kun
[EMAIL PROTECTED] wrote: > Kun wrote: >> I am trying to make an if-statement that will not do anything and print >> 'nothing entered' if there is nothing entered in a form. I have the >> following code that does that, however, now even if I enter something > > Yes, but did you enter everything? >

Re: multiple parameters in if statement...

2006-04-15 Thread [EMAIL PROTECTED]
Kun wrote: > I am trying to make an if-statement that will not do anything and print > 'nothing entered' if there is nothing entered in a form. I have the > following code that does that, however, now even if I enter something Yes, but did you enter everything? > into the form, the code still o

multiple parameters in if statement

2006-04-15 Thread Kun
I am trying to make an if-statement that will not do anything and print 'nothing entered' if there is nothing entered in a form. I have the following code that does that, however, now even if I enter something into the form, the code still outputs 'nothing entered'. This violates the if state