Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.017 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'from:addr:python': 0.09; 'subject:Problem': 0.09; 'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'received:84.92': 0.16; 'received:84.92.122': 0.16; 'received:84.92.122.60': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'reply-to:addr:python-list': 0.16; 'subject:form': 0.16; 'wrote:': 0.16; 'charset:iso-8859-7': 0.19; 'insert': 0.19; 'header:In-Reply-To:1': 0.22; 'string': 0.24; 'values': 0.32; 'header:User-Agent:1': 0.33; 'instead': 0.33; 'to:addr:python-list': 0.33; 'received:84': 0.34; 'reply- to:addr:python.org': 0.34; 'comment': 0.35; 'some': 0.38; 'comments': 0.38; 'subject:: ': 0.39; 'to:addr:python.org': 0.40; 'header:Reply-To:1': 0.71; 'reply-to:no real name:2**0': 0.72; 'guest': 0.73; "'@'": 0.84; '8bit%:54': 0.84 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.0 cv=J8QoHXbS c=1 sm=1 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=9jsOeB20M3cA:10 a=1qANcUZvIwcA:10 a=OUOv7kDek9cA:10 a=E_FQspuQcigA:10 a=eM_JSV5JwoSnihaM8XkA:9 a=ypuHOh461MFTJRa3LCsA:7 a=o3X3QV6JOaEA:10 a=0nF1XD0wxitMEM03M9B4ZQ==:117 X-AUTH: mrabarnett:2500 Date: Fri, 13 Jan 2012 19:35:41 +0000 From: MRAB User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Problem filling an html form References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: python-list@python.org List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1326483339 news.xs4all.nl 6990 [2001:888:2000:d::a6]:47221 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:18936 On 13/01/2012 17:02, Νικόλαος Κούρας wrote: > # get some enviromental values > form = cgi.FieldStorage() > mail = form.getvalue('mail') or '' > comment = form.getvalue('comment') or '' > > # insert guest comments into database if form was submitted > if '@' in mail and comment not in ("Ρωτήστε με σχετικά..."): [snip] Do you really want to look for the comment in that string instead of looking for that string in the comment?