Is it possible to enter HTML form data into a database with SQL without using a PHP script?
-
2No. Without Server Side Scripting Posting Data to DataBase Not possible at all. If you are Stuck check out This geeksforgeeks.org/…DineshMsd– DineshMsd2021-07-23 07:13:44 +00:00Commented Jul 23, 2021 at 7:13
-
Certainly we do not want to open our databases for connections from anywhere.Serg– Serg2021-07-23 08:16:01 +00:00Commented Jul 23, 2021 at 8:16
2 Answers
It is possible to do it without using a PHP script, but not without using some kind of server-sided script. if your database is stored on a server. It doesn't have to be PHP, it just needs to be something that can take your form data and pass it to the database. Or if your database is stored on your client PC, you could do it there I guess.
2 Comments
No you can't (so far my knowledge goes, i never heard of it anyway) plus you might get into big security problems as you have no control of injection attaks. Always use a server language of any kind (php, asp, python, java or similar) and validate all data before it gets pushed to the database. anyway you can pull data directly with html/xml (old fashined way) but still i think of leaks! my advice to begin with would be a framework what does the job for you in a secure/ save way like laravel, symfony, yii2 or doctrine. there is very much example code and your learning curve for php might be easier thank plain php.
here's the link to the old fashion way of getting data without php but not sending it to the db directly: https://smallbusiness.chron.com/insert-form-mysql-51070.html