|
Posted by nice.guy.nige on 04/01/06 20:29
While the city slept, LeftHorn (leftnospamhorn@spameenoono.nu) feverishly
typed...
> Hi,
>
> I have a problem...Got a webpage with alot of different input fields
> - where a user can maintain a database.
>
> They are allowed to use 'spaces' in their textfields, sometimes they
> require to insert a space in the end, sometimes it would be fatal if
> they do
[spaces at end of fields]
There are a couple of options. One as mentioned is to test the data when it
is received. If you know what fields are *not* allowed to have spaces at the
end you can strip them. Also, you can scan the fields (server side),
checking the last character in each one where there may be a problem. If the
last character is a space, you can warn the user and ask them to edit the
field. And another also, use something like PHP to display the contents of
the field (outside of a text box) wrapped in something like square brackets.
This is something I have done in the past in C programming so I can the full
content of a string, including leading or trailing spaces. Something like
<p>[<?=$field1?>]</p>.
Hope that helps.
Cheers,
Nige
--
Nigel Moss http://www.nigenet.org.uk
Mail address will bounce. nigel@DOG.nigenet.org.uk | Take the DOG. out!
"Your mother ate my dog!", "Not all of him!"
Navigation:
[Reply to this message]
|