Leading Zeroes

Discussion in 'HTML' started by Kevin Marks, Apr 27, 2007.

  1. Kevin Marks

    Kevin Marks Guest

    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?
    Kevin Marks, Apr 27, 2007
    #1
    1. Advertising

  2. Kevin Marks wrote:

    > 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.

    --
    -bts
    -Motorcycles defy gravity; cars just suck
    Beauregard T. Shagnasty, Apr 27, 2007
    #2
    1. Advertising

  3. Kevin Marks

    Kevin Marks Guest

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


    "Beauregard T. Shagnasty" <> wrote in message
    news:cQmYh.372872$...
    > Kevin Marks wrote:
    >
    >> 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.
    >
    > --
    > -bts
    > -Motorcycles defy gravity; cars just suck
    Kevin Marks, Apr 27, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Bluer

    Easy way to define lots of zeroes

    Peter Bluer, May 9, 2006, in forum: VHDL
    Replies:
    4
    Views:
    599
    Peter Bluer
    May 10, 2006
  2. Mike P

    csv and leading zeroes

    Mike P, Oct 4, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    541
    Jon Paal
    Oct 4, 2006
  3. John Nagle
    Replies:
    4
    Views:
    584
    James Antill
    Aug 7, 2007
  4. Delaney, Timothy (Tim)
    Replies:
    0
    Views:
    562
    Delaney, Timothy (Tim)
    Aug 7, 2007
  5. veevee1
    Replies:
    0
    Views:
    1,236
    veevee1
    Dec 14, 2009
Loading...

Share This Page