Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

206
Views
How to create a MySQL sentence in Javascript file with SweetAlert2

I'm creating an ULTRA basic alert with SweetAlert2 and I have an input (text) in it, where I want the inserted text to be inserted in a MySQL database, I know that Javascript doesnt support MySQL natively, so that's where my question go, what tool, plugin, extension should I use?

Here is a visual representation of what I have:

Here is the SweetAlert with an input

Here is a second sweet alert where I see that the text has been succesfully storage in a variable

And finally here is my code (very simple)

Here is my code:

(async () => {
    const {value: name} = await Swal.fire({
        title: 'Hello',
        text: 'Insert your name',
        confirmButtonText: 'REGISTER',
        input: 'text'
    });

    if(name){
        Swal.fire({
            title: `Welcome ${name}`
        });

        //Here I want to insert the name in a MySQL database

    }
})()
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!