i've attend the interview for a job, they asked me one question like how do you insert a new record to the DB using only jquery and mysql? I answered to use jquery ajax, but they don't accept, they said we want to use only jquery and mysql and not any other. I've searched in google and didn't get possible solutions. Can you help me?
JavaScript/jQuery can not connect directly to the database And that is good for many reasons
You need to make an Ajax call to the server to send the data that you want to be placed into the database. Youe server side code in the backed would do the connection to the mysql server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With