Reputation:
Is it possible to enter HTML form data into a database with SQL without using a PHP script?
Upvotes: 0
Views: 175
Reputation: 983
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.
Upvotes: 1
Reputation: 3
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
Upvotes: 0