Create a php function to add jquery searches

In Progress

Description

I want a function that will create a JQuery search box based on provide query select strings. It will create a hidden field with the id number associated with the selected value of the search. This id number will be passed and most likely used.

function jquery_search($qs_show, $hidden_name, $pass_var; $main_table, $qs_search=NULL, , $qs_drop = NULL, $style = NULL, $search_name=NULL, $drop_name=NULL) //don't worry about the variables you are not asked to use. They will be implemented later, but we want them in the function for now. Just mark them as null

- puts a search box. It should search the results of $qs_search. It should show in the search box the corresponding results of $qs_show.

when a result is selected, the corresponding $pass_var is put as the value for $hidden_name. If no $pass_var provided, use Primary Key for $main_table.

- if $qs_show is NULL, set it equal to $qs_search

- if $search_name is NULL set search field name to $hidden_name."_search”

- if $style is NULL style and/or class should be name of variable (I don't know exactly which is used by jquery)

- The results of the two queries are connected by the $pass_var. The results of $qs_search are searched, and the results of $qs_show with the same $pass_var are shown.

An Example

$qs_show = "select '( ', [url removed, login to view], ')', [url removed, login to view], [url removed, login to view] from table1 JOIN table2 on [url removed, login to view] = [url removed, login to view]"

$hidden_name = "xid"

$pass_var = "[url removed, login to view]"

$qs_search = "select [url removed, login to view] as xid, [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view],[url removed, login to view], [url removed, login to view] from table1 JOIN table2 on [url removed, login to view] = [url removed, login to view]"

In this situation, the search box would be called "xid_search" and would have the style/class "xid_search". There would be a hidden variable "xid" which would have the class "xid". When the user typed in xid_search, the page would search the results of $qs_search for matching text. But the user would see the corresponding result of $qs_show. So if they typed the first few numbers of a phone number, the function should find every result of $qs_search for any result with that phone number. The user would see the results of $qs_show that had the same xid as the results of qs_search that matched what the user typed. The idea is to be able to search as many possible fields without forcing the user to see all of the results, just the most important information for them to choose who they want. When the user selected the row they want, the value of the hidden variable "xid" would be set to value of xid from the selected row of the query.

Skills: Javascript, jQuery / Prototype, PHP, Software Architecture

See more: this class jquery, php function for, numbers function, number function, matching strings, jquery class, function of numbers, function numbers, function number, find php chapter two, php function , create php, searches, search box jquery, jquery fields, jquery post, php post value, search jquery, php jquery search, php hidden fields, row text php, php value post, jquery primary, add key, number searches

Project ID: #5049614

5 freelancers are bidding on average $151 for this job

rajeshsonisl

Hello, With 99% completion rate, 650+ successfully completed projects, and a 5.00 reputation (maximum possible, 5.0) (Yes, not even 4.99 !!)... you can never go wrong choosing me :) I look forward to your reply. More

$257 USD in 1 day
(483 Reviews)
7.4
codinglover89

This is easy task,it can be done with simple Ajax call. I ready to finish it now. For more info please check my profile to see the reference of similar projects.

$120 USD in 2 days
(18 Reviews)
5.9
acer2004sl

Hello, I'm very interesting, and can start implement that right now. more details may be discussed. Best Regards

$100 USD in 2 days
(169 Reviews)
5.9
LearningNew

More then 7 years of working experience in Telerik Open Access ORM, Entity FrameWork using Code First, Database First Approaches, ASP.NET, Window Service, Web Service, MVC 3.0, MVC 4.0, C#, VB.NET, SQL Server, Access, More

$177 USD in 2 days
(1 Review)
3.0
ajayshrivastav91

Hi, We are very clear with the specification mentioned and ready to start your project immediately. We are pleased about having the opportunity to work together. Sir , TI World is Indian base company. You can see o More

$95 USD in 1 day
(2 Reviews)
3.0
ldmarv256

Good Day. I'm experienced with web technologies. At your service. I have worked with php, java, html, javascript, css, c and c++, using mvc pattern in some projects. I have more than 3 years of experience working wi More

$100 USD in 7 days
(3 Reviews)
2.4