Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8531335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:27:38+00:00 2026-06-11T09:27:38+00:00

I am a newbie to jQuery; I want to get the data from a

  • 0

I am a newbie to jQuery; I want to get the data from a database to auto-complete a text box.

I have coded the PHP to get the values from the database. How can I get these PHP values in a jQuery page?

This is the script:

 <script>
    $(function() {
        var Theaters = [
            "PVR",
            "SCR",
            "MTR"
        ];
        $( "#tags" ).autocomplete({
            source: Theaters
        });
    });
    </script>

This is the PHP page:

<?php
mysql_connect("localhost", "root") or die (mysql_error ());
mysql_select_db("theaterdb") or die(mysql_error());
$strSQL = "SELECT * FROM theaters";
$rs = mysql_query($strSQL);
while($row = mysql_fetch_array($rs)) 
{
echo $row['theater_name'] . "<br />";
 }
mysql_close();
?>

How can I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:27:39+00:00Added an answer on June 11, 2026 at 9:27 am

    Use ajax for this purpose.

    <html>
     <head>
     <title>Untitled Document</title>
     <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
     <script type="text/javascript">
     $(function(){
        $('#radioid').click(function() {
        $('#txtDoorStyle').val($(this).val());
    });
     });
     </script>
      </head>
     <body>
     <input type="radio" id="radioid" value="Door Half Transom (011)" name="doorstyle">
     <input type="text" value="" id="txtDoorStyle" name="txtDoorStyle" >
     </body>
     </html>>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm newbie with jQuery. I Want to get value from these two textarea, I
i want to get data from mysql db, first user select db, then enters
I am the newbie of jQuery. I want to get the top offset of
Well, I have a simple page displaying records from Database with PHP & MySQL.
jQuery-newbie here. I want to do a simple horizontal scroll function with two buttons.
I am newbie to jQuery. In netbeans I have jquery-1.7.2.js where all HTML files
I'm a newbie to jquery, but have managed to make a show-function and hover
I'm a jQuery newbie, and I have trouble with a little script I created.
Forewarning: I'm a newbie to JQuery. I have a collection of links and lists
I'm a newbie in Jquery Ajax. I need your help. I want to display

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.