1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Rep Power
    I can't get numeric checking from form fields to work. The fields coming back from a form are strings so they always fail the is_int() function even if they contain an integer.

    All I want to do is check for an integer in a form field.

    Help appreciated - it's driving me crazy.

  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Rep Power

    use ereg() function for that..

    try following..this will check an integer in a string...




    echo "it is validn";
    echo "it is not validn";


    SR -

    "The fear of the LORD is the beginning of knowledge..."

Similar Threads

  1. Add $ENV{REMOTE_USER} to end of textarea field on a form
    By k9barry in forum HTML Programming
    Replies: 8
    Last Post: February 4th, 2004, 01:36 PM
  2. Inserting from form to multiple tables
    By barth in forum MySQL Help
    Replies: 0
    Last Post: January 25th, 2004, 09:27 AM
  3. HTTP Error 400: Bad Request, with basic form
    By crackwombat in forum PHP Development
    Replies: 1
    Last Post: January 23rd, 2004, 06:40 PM
  4. sending form field data
    By bellcom in forum PHP Development
    Replies: 1
    Last Post: January 19th, 2004, 03:39 PM
  5. html form problem using mult select and file field
    By Justin_M in forum HTML Programming
    Replies: 4
    Last Post: January 5th, 2004, 07:13 PM

IMN logo majestic logo threadwatch logo seochat tools logo