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

103
Views
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
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!