Leading Zeroes

K

Kevin Marks

I have a form field that takes the Credit Card ID from the back of the card.
Sometimes this number begins with a zero. When the data goes from the form,
there are only two digits left. Is there a way to keep the leading zero?
 
B

Beauregard T. Shagnasty

Kevin said:
I have a form field that takes the Credit Card ID from the back of the
card. Sometimes this number begins with a zero. When the data goes
from the form, there are only two digits left. Is there a way to keep
the leading zero?

Where are you not seeing the leading zeros? In your database? In an
email sent to you upon submit?

My database philosophy has always been "if you don't need to do math
with it, make it a character field." Like zip/postal code fields.
Numeric fields will (almost) always strip leading zeros.
 
K

Kevin Marks

I think that was it. I had the field set as a number rather than a character
field. Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top