Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
![](/static/devrant/img/pipeless-devrant-banner-white.png)
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@FinlayDaG33k i find it easier to connect to a database and store the data. When it's about forms i use php. But depends of the form ofc.
-
@Clear0Ff Think you might have misunderstood the question at hand.
It's about the way the front-end sends it to the back-end.
It will both POST to a PHP script, but I wanted to know what people like better, using the form-action for that, or catching the submission with a listener and send it using Javascript instead. -
C0D4682466y@FinlayDaG33k
Usually, add the form action in so the page will refresh, and collect the posted content at the other end for non-Js users, but intercept the form submission with js and post it there with Ajax for a seemless experience where possible.
Sometimes you may not get the option of the fallbacks depending on the business / project but use them where you can.
Related Rants
On the contact page of my project, I want to send data from a HTML form.
What would you use to send it?
Just the regular <form action="/path/to/handler"> and cause a page refresh or use javascript (jQuery) for it and not cause a page refresh?
In both cases, a message will be shown on success or failure.
question
php vs javascript
forms