Create a php function to add jquery searches

In Progress Posted Oct 21, 2013 Paid on delivery
In Progress Paid on delivery

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 '( ', [login to view URL], ')', [login to view URL], [login to view URL] from table1 JOIN table2 on [login to view URL] = [login to view URL]"

$hidden_name = "xid"

$pass_var = "[login to view URL]"

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

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.

JavaScript jQuery / Prototype PHP Software Architecture

Project ID: #5049614

About the project

4 proposals Remote project Active Nov 4, 2013

4 freelancers are bidding on average $159 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
(1015 Reviews)
8.8
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
(53 Reviews)
6.7
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
(269 Reviews)
6.9
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
(16 Reviews)
4.1