SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Evangelist
    Join Date
    Jun 2005
    Posts
    436
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Live Form Validation - How To?

    I tried doing form validation for php, but I'm running into problems keeping the content in the feilds, and I saw something I would much rather have.

    This is the effect I am going for:
    http://www.phpfreaks.com/forums/inde...1&coppa_pass=1

    How would I accomplish that? Is there a tutrial somewhere? One part that really has me lost is how do they query the DB for a username. To see how it works, try using the username e39m5, once you take focus out of the feild, it knows that its already in the database.

    Thanks,
    e39m5

  2. #2
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,810
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Not entirely sure what you're after here, but it sounds to me like you may be referring to Ajax - in this case the use of JS (or ECMAscript) to send a request to the database on the fly. Some of the basics can be found here, SP also publishes a rather good book covering the subject (and your exact problem if memory serves) here.

    You will need to ensure that your PHP validation is working anyway though, Ajax is only scrummy if people have compliant browsers, and the JS is switched on. There is an easy to follow tutorial covering php and forms here
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  3. #3
    SitePoint Enthusiast aamelyan's Avatar
    Join Date
    Feb 2006
    Location
    Milwaukee, WI
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    AJAX in it's beauty ...

  4. #4
    SitePoint Enthusiast aamelyan's Avatar
    Join Date
    Feb 2006
    Location
    Milwaukee, WI
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  5. #5
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know it's not quite what you're asking, but might be helpful: Degradable Ajax Form Validation.

  6. #6
    SitePoint Evangelist
    Join Date
    Jun 2005
    Posts
    436
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for all the links, it really complex since I've never used any of these languages before. Im going to see if I can ever get this running, eventually I hope to find some pattern sort of pattern so I can add more fields. I will post if I ever get it done

    e39m5

  7. #7
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ajax is rock and roll for web2.0


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •