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 5 of 5
  1. #1
    New Coder
    Join Date
    Mar 2006
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Which PHP page is better?

    When in doubt, ask the experts!

    I had a question. Which 'type' of PHP pages are better, self-validating pages or passing the information to another page?

  • #2
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    "Better" in what way?
    Depending on how you handle your forms either can be more convienient for you.
    There is no real difference in performace/security.
    I'm not sure if this was any help, but I hope it didn't make you stupider.

    Experience is something you get just after you really need it.
    PHP Installation Guide Feedback welcome.

  • #3
    New Coder
    Join Date
    Mar 2006
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ah ok.

    I was just wondering. I have the habit of passing the information to another page. Like if I were making a login page, if it were better to use a self-validating page or opening up a new one. That's why I was asking.

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,465
    Thanks
    0
    Thanked 634 Times in 624 Posts
    Using the same page makes it easier to redisplay the form along with error messages if there are errors in what was entered.

    Using the same page also makes it harder to handle the situation where the data entered is valid as you have to check where the page was called from etc.

    Which is better depends on how you see the tradeoff between these.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #5
    New Coder
    Join Date
    Aug 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I always use self-validating pages.. if statements are a programmers best friend! If you programming and make the pages neat and clean looking... its also easier to fix, addon and take off script from your pages.

    -Nate


  •  

    Posting Permissions

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