Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

199
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda