Current location: Hot Scripts Forums » Programming Languages » PHP » Get values from another php page through Jquery

Get values from another php page through Jquery

Reply
  #1 (permalink)  
Old
Wannabe Coder
 
Join Date: Aug 2009
Posts: 127
Thanks: 16
Thanked 0 Times in 0 Posts
Get values from another php page through Jquery

Hi All,


I am having three textboxes which will autosuggest accordingly. I am able to get the values statically but i need it through my database. I dont know how to call php values from another page to pass in jquery. For three textboxes i will be using three different php pages. I don't know if i have to call JSON format or post values from php page.Can anyone help me how to get this.

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>RGBSI: Jobs</title>
<link rel="stylesheet" type="text/css" href="css/css1.css" media="screen"/>
        <link href="styles/examples-offline.css" rel="stylesheet" />
        <link href="styles/kendo.default.min.css"rel="stylesheet" /> 
        <link href="styles/kendo.common.min.css" rel="stylesheet" />
         <script src="js/jquery.min.js"></script>
        <script src="js/kendo.web.min.js"></script>
        <script type="text/javascript">var switchTo5x=true;</script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript" src="http://s.sharethis.com/loader.js"></script>
  <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css" />
   
    <script src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script>
    <script>
    $(function() {
        var availableTags = [  // i want this values to be called from php page
            "Abap",
            "Admin", 
            "Ajax", 
            "BASIC",
            "C",
            "C++",
            "Clojure",
            "Dot Net",
            "Django",
            "Javascript",
            "Gaming",
            "Mysql",
            "Need PHP",
            "Java",                 
            "Java with 3 years",
            "Php",
            "RGBSI",
            "RGBSI2"                    ];
        $( "#title" ).autocomplete({
            source: availableTags
        });

        var availableTagss = [
                             "PHP",
                             "Javascript",
                             "Asp",
                             "BASIC",
                             "C",
                             "C++",
                             "Clojure",
                             "COBOL",
                             "ColdFusion",
                             "Erlang",
                             "Fortran",
                             "Groovy",
                             "Haskell",
                             "JavaScript",
                             "Lisp",
                             "Perl",
                             "Python",
                             "Ruby",
                             "Scala",
                             "Scheme"
                         ];
                         $( "#skills" ).autocomplete({
                        	 source: availableTagss
                         });
                         var availableTagsd = [
                                               "Ananthapur",
                                               "Andhra",
                                               "Bangalore",
                                               "Chennai",
                                               "Dhone", 
                                               "Delhi",
                                               "Goa", 
                                               "Kurnool",
                                               "Kerala",
                                               "Mysore",
                                               "Nandyala",
                                               "TamilNadu"                                              
                                          ];
                                          $( "#location" ).autocomplete({
                                              source: availableTagsd
                                          });
        
    });
    </script> 

</head>
<body>

<div class="cl"></div>
<div class="search">
<form method="post" action="searchjob.php"> 

<input type="text"  id="title" name="title"  />
<input type="text" id="skills" name="skill"  />
<input type="text" id="location" name="location"  />
<input type="submit" value="Search" name="submit"/>
</form>
</div>

</div>

</body>

</html>

The below is my php code from another php pages

PHP Code:



<?php

<?php 
$query2 
mysql_query("Select title from jobs ");
while(
$result mysql_fetch_array($query2))
{
echo 
"$result[title]";
}
?>

?>
Reply With Quote

Featured Marketplace Scripts (view more)

Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you output PHP on index page. 9999 PHP 4 07-25-06 08:57 PM
Display PHP in HTML page using JS scott2500uk PHP 6 05-18-06 12:25 PM
Classified Ads skipper23 Perl 3 11-22-05 02:22 AM
question about updating a page or database for an, php and mysql updating mikewooten PHP 1 02-12-04 12:11 AM


All times are GMT -5. The time now is 03:30 PM.
vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.