Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Mar 2010
    Location
    Orlando, FL
    Posts
    159
    Thanks
    4
    Thanked 8 Times in 8 Posts

    Question PHP form validation

    I have a form on my website that takes what a user inputs and queries MySQL. Is it best to have the form validation on another page of my site, where I would need to use $_POST to get the inputted info? Or should I be using a function on the same page as the form itself? Or a function on another page? I just want to the best/safest/fastest way this should be done.

  • #2
    New to the CF scene
    Join Date
    Jun 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    For the best/safest/fastest way validating you form you can use javascript on the same page. This will reduce error when you submitting data to insert to your database.

    There are plenty of javascript validation codes around the net. You can search it.

  • #3
    Regular Coder
    Join Date
    Mar 2010
    Location
    Orlando, FL
    Posts
    159
    Thanks
    4
    Thanked 8 Times in 8 Posts
    Yeah, but not all browsers have javascript enabled for some reason or another. You should always have a back up for when the user has javascript turned off.


  •  

    Posting Permissions

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