Best method for functioning forms ? PHP? Javascript?

Best method for functioning forms ? PHP? Javascript?
0.0 0


I’ve searched this and am settled on creating my own form for my portfolio site using some PHP script copied and pasted into a contact.php file which I will upload to my hosting. But…I’m wondering if there is a more modern way, or this is how it’s supposed to be done?

I have seen that there are open source third-party services that essentially allow you to use their php script to post to your email. I’m wondering however if this produces a page back that has the “message received” type response once the button is clicked. It seems client-side validation is achievable with javascript. Please help! This is for the portfolio project that I’ve been delaying because of hiccups like this. I want a functioning page. There seems to be direct to personal email capability using “action method:get …

My question is how to provide feedback after the button is clicked. I think I could use jquery to select the event and produce a message linked to the button using…I’m sure I can manage this i was just wondering the easiest way. Or if there are pre-built scripts or something that manage the posting, validation and the layout already available in bootstrap. The one I have downloaded don’t seem to work. Sorry for the confused message. I’m confused!!


If you want some feedback to appear without the page reloading, you can try Ajax. A simple $.post() function would do. You can pass a callback sucess function to it. Just Google Ajax. You can use some framework for your project for form validation.


Have you tried it’s a very simple way to add functioning forms to you website. And if you want you can customize it too. All you need is a little Javascript to make it your own style


(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)


I generally use an add-on to Node.JS called Socket.IO. It’s an unbeliveably easy way to get started with client-server communications in real-time, and it also has binary streaming, so you can send just about anything.


It may be a bit biased but I avoid PHP at all costs, so javascript.


Thanks. This was what I was looking at. How do I go about implementing feedback to the user that the form has been sent or an error message though?

Whichever way is the standard way I can do. I’ve looked at Ajax and php tutorials to do it. I just want the proper way to do it so I can carry on using the same method in future sites. I may be missing the form validation and feedback on formspree as it doesn’t work from codepen. So maybe this is included and I just can’t see it.

So Github pages is for a site to be uploaded and tested whilst working on it? What’s the difference over using my own Web hosting? (I have a domain but no site yet)



(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)


Ah. This seems like the way to go for now.

Just wondering … If I choose to use git for version control and also pages as in the guide you linked to – do I have a way of saving locally from within Codepen? Or do I have to create separate html, css and js files? It would be handing if there was a way that it saved locally as well as these could then be committed to Git and render on GitPages.



(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)