PHP Validation help

Discussion in 'PHP' started by php_noobie, Jun 4, 2008.

  1. #1
    Hi I need help with form validation here. Currently I am working on my sch project which is a hotel website. I want to validate user input such that when the input format is wrong or when the required field(s) is empty, the error message will appear on the SAME page to inform the user (instead of a pop up box like the traditional javascript way)

    I have attach to this thread an image file illustrating an example of the output I wanted as mentioned above. Feel free to take a look and see if you have any idea how to code it

    Thank you
     

    Attached Files:

    php_noobie, Jun 4, 2008 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    can't view the image due to an database error on dp, please upload it somewhere else and link it! :)
     
    EricBruggema, Jun 4, 2008 IP
  3. php_noobie

    php_noobie Peon

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    There you go

    [​IMG]
     
    php_noobie, Jun 4, 2008 IP
  4. php_noobie

    php_noobie Peon

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I want the validation to works like the paypal system, a box with red words will appear should the user failed to meet the registration requirement
     
    php_noobie, Jun 4, 2008 IP
  5. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #5
    You can do this by using PHP to check your input and return to the same page while adding extra information! and most sites use Javascript and PHP to check forms!
     
    EricBruggema, Jun 4, 2008 IP
  6. php_noobie

    php_noobie Peon

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Bro care to share a sample code here?

    Is it just PHP, or a combination of PHP+ javascript?
     
    php_noobie, Jun 4, 2008 IP