a246530 Posted July 30, 2013 Share Posted July 30, 2013 Hey guys, I am fairly new to php and have been working on a project for about a week. I am currently running all of my queries and all of my events inside of my site. When i submit a form it checks for isset on that button then i run a function to process data. As far as readability, its getting pretty long and finding things when i need to change them is taking some time. I was looking into ajax for php form submit so i can do it without refreshing (with php self i dont have to refresh and i like it this way). As far as performance goes....which is better; the ajax form process or php self form process? Quote Link to comment https://forums.phpfreaks.com/topic/280634-php-self-vs-ajax-external-php/ Share on other sites More sharing options...
KevinM1 Posted July 30, 2013 Share Posted July 30, 2013 Ajax won't stop you from having to process things and validate on the back end. Remember: JavaScript can be turned off. For performance, if everything is written well, the initial page hit will be a bit bigger with Ajax than without, simply because you'll have more code coming through the pipe to be processed by the browser. Subsequent hits (like form submissions) will be better, though, because you'll only be handing that data and not having to re-render the rest of the page. Quote Link to comment https://forums.phpfreaks.com/topic/280634-php-self-vs-ajax-external-php/#findComment-1442707 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.