/    Sign up×
Community /Pin to ProfileBookmark

Is there a GO-TO PHP script for processing FORMS??

or do most PHP programmers simply validate and send their forms by coding it themselves??

Also, should I be using Javascript field validation in conjuction with PHP or validate the data and process the form entirely with PHP?

to post a comment
PHP

6 Comments(s)

Copy linkTweet thisAlerts:
@NogDogMar 19.2013 — Most PHP frameworks (CodeIgniter, Zend, etc.) have some sort of form processing/validation library.
Copy linkTweet thisAlerts:
@johnny916authorMar 19.2013 — Great, what about the javascript question?
Copy linkTweet thisAlerts:
@NogDogMar 19.2013 — JavaScript validation would only be for user convenience (which is not a bad thing, mind you), but it is easily bypassed, so you still have to do any "important" validation on the server side.
Copy linkTweet thisAlerts:
@johnny916authorMar 20.2013 — Then why not just do all the validation on the server side? Why make validation so complicated..
Copy linkTweet thisAlerts:
@NogDogMar 20.2013 — Because if it's something like validating that a field is an integer between 1 and 100, you can validate that on the browser side (JavaScript) and not have to send a HTTP request to the server, wait for the response, and then redisplay the page with the desired error message when you find out they entered

"-123.59". Not a big deal, and something that can be added when you have time, or never if you don't feel it's important and server response time is seldom an issue on your site -- just another tool in your toolkit when it makes sense to do it. (And if you code your JavaScript every bit as modularly as you code your PHP and make use of JavaScript frameworks where it makes sense to do do, then it does not have to take all that much work to do -- beyond the learning curve of using a new framework and such.) Like pretty much everything else in this business, there's never one correct answer: it all depends on specific requirements, time, and budget.
Copy linkTweet thisAlerts:
@johnny916authorMar 20.2013 — Wow thanks..
×

Success!

Help @johnny916 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...