Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

105
Vistas
How to show PHP values from sql query through javascript variable onto screen

I am looking to have my sql query ( that is put into php) put into a javascript variable to put on the screen for my npc dialogue:

i.e (quick example not exact)

$getdetails=mysql= Select * from quests WHERE npc='Person"

While ($row= mysql_fetch_array($getdetails)
{
    $activequest= $row['questname'];
    $showactive= "<tr> <td> $activequest </td></tr>";
}

(i have the dialogue in a html table where the options pop up for a user to click on)

this would make a list of results as a list:

-quest one

-quest two

-quest three

how do i get that list of results from my php to show onto my screen through a javascript variable and put it on the screen so a user can choose which quest theyd like to get dialogue for -- im using innerhtml to put the dialogue on the screen for the regular static options which works fine id like to do the same for the result options so if there is 3 quests they are listed or if there is 5 quests they are listed etc.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda