Re: REALLY need a hand

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 23841
interpreted = N
texte = At 5:38 AM 2/18/99, Nitai wrote: >1. If there are spaces in the adress fields or in the phone number then in >the form field it looks like this: >adress: Street to live Looks like: street >phone: 619-67865-1 Looks like: 619You need to put quotes around the value in each of your inputs, like this: ^ ^ Most browsers will interpret the next space (or hyphen, apparently as the end of the value. In fact, quotes are required by the HTML spec in all attribute/value pairs.For saftey's sake you should also wrap your values in [input], like this: ^^^^^^^ ^^^^^^^^ This will avoid potential problems with users inputting things like quotes and ampersands.>2. If the customers leave one field emtpy while registering, the emtpy field >is filled with or [adress2] after getting the customers address >back into the form.The changes outlined above should fix this as well.>3. If two customers have the same password, the form is filled with the >customer who comes first in the profile.db. Of course this is bad. But I >think it is only a wrong search string. Any help? >[search db=profile.db&eqpassworddatarq=[password]&eqemailrq=[email]&max=1]I think your password problem stems from a problem in your search sytax. eqemailrq=[email] is incorrect, so no searching is being done on the email field. Only the password field is being searched, so you are coming up with the wrong records. The correct syntax is eqemaildatarq=[email] You will probably want to add emailBlnk=T and passwordBlnk=T to your search criteria as well. Otherwise a user has to enter only the password or only email address, but not both, in order to view a record. So I'd try this search string: [search db=profile.db&eqpassworddatarq=[password]&passwordBlnk=T&eqemaildatarq=[email]&e mailBlnk=T&max=1]Also, unless you are using the [password] value entered into the browser's security dialog, it would be a good idea to change your field name to [pass] or [pword] or something else. Otherwise, you will run into conflicts with the built-in variable [password] when you try to use browser authentication somewhere down the line.Hope this helps.-Dave o--------------- Dave MacLeay --+ o----------- Digital Frontier --+ o--------------- 802.253.8612 --+ o--- dave@digitalfrontier.com --+ Associated Messages, from the most recent to the oldest:

    
  1. Re: REALLY need a hand (Dave MacLeay 1999)
  2. REALLY need a hand (Nitai 1999)
At 5:38 AM 2/18/99, Nitai wrote: >1. If there are spaces in the adress fields or in the phone number then in >the form field it looks like this: >adress: Street to live Looks like: street >phone: 619-67865-1 Looks like: 619You need to put quotes around the value in each of your inputs, like this: ^ ^ Most browsers will interpret the next space (or hyphen, apparently as the end of the value. In fact, quotes are required by the HTML spec in all attribute/value pairs.For saftey's sake you should also wrap your values in [input], like this: [input][name][/input] SIZE=30> ^^^^^^^ ^^^^^^^^ This will avoid potential problems with users inputting things like quotes and ampersands.>2. If the customers leave one field emtpy while registering, the emtpy field >is filled with or [adress2] after getting the customers address >back into the form.The changes outlined above should fix this as well.>3. If two customers have the same password, the form is filled with the >customer who comes first in the profile.db. Of course this is bad. But I >think it is only a wrong search string. Any help? >[search db=profile.db&eqpassworddatarq=[password]&eqemailrq=[email]&max=1]I think your password problem stems from a problem in your search sytax. eqemailrq=[email] is incorrect, so no searching is being done on the email field. Only the password field is being searched, so you are coming up with the wrong records. The correct syntax is eqemaildatarq=[email] You will probably want to add emailBlnk=T and passwordBlnk=T to your search criteria as well. Otherwise a user has to enter only the password or only email address, but not both, in order to view a record. So I'd try this search string: [search db=profile.db&eqpassworddatarq=[password]&passwordBlnk=T&eqemaildatarq=[email]&e mailBlnk=T&max=1]Also, unless you are using the [password] value entered into the browser's security dialog, it would be a good idea to change your field name to [pass] or [pword] or something else. Otherwise, you will run into conflicts with the built-in variable [password] when you try to use browser authentication somewhere down the line.Hope this helps.-Dave o--------------- Dave MacLeay --+ o----------- Digital Frontier --+ o--------------- 802.253.8612 --+ o--- dave@digitalfrontier.com --+ Dave MacLeay

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Problems with [Applescript] (1997) WebTen Type 2 Crash on start (2000) Public beta 2 for WebCatalog 4.0 is now available. (2000) Grep Question - MAY NEVER BE SOLVED (2003) [REFERRER] bug? (1998) b18 problem on NT 4.0 (1997) Date Formats (1997) Mac Vs WindowsNT (1997) WebCat2: Master Counter snippet (1997) WebCat2b15MacPlugin - [protect] (1997) I'm having trouble using [url][interpret][math] together in lookup (1997) [WebDNA] tcp connect is slow...any ways to speed it up? (2008) 2.01 upgrade problems (1997) Cookie problems using Mozilla and Camino browsers (2004) Count regular expressions in a file (2007) Re(8): Small Bug: ErrorLog.txt/[FORMVARIABLES]/[ORDERFILE] (1998) Spawn doesn't work as advertised ... (2000) Searching multiple Databases (1997) Error Messages Returned to User (1997) Site Test Please (2005)