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 383475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:17:11+00:00 2026-05-12T15:17:11+00:00

I am using WordPress with JQuery to create a vehicle selection form. Vehicle information

  • 0

I am using WordPress with JQuery to create a vehicle selection form.

Vehicle information is retrieved by JQuery Ajax calls to a PHP backend script. The PHP scripts query an SQLite database for vehicle information.

WordPress form -> JQuery get -> PHP script -> SQLite DB

I have three distinct queries that need to be executed:

  1. Vehicle makes available
  2. Vehicle models for a specific vehicle make
  3. Vehicle years for a specific vehicle make and model

I could create a custom PHP script that accepts a “query_type” parameter from the JQuery get call. The PHP script would then run the appropriate SQL query. That option sounds mediocre at best.

Should I create a custom PHP file for each of the three queries?

OR

Is there a neat PHP tool that will create something similar to .NET’s Service Endpoints?

The Service Interface Pattern

Thanks Everyone!

  • 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-05-12T15:17:11+00:00Added an answer on May 12, 2026 at 3:17 pm

    Use JQuery to post the “type” of query you want to get. You should only need one PHP script, just let the PHP determine what type of data is being requested.

    You might want to look into returning JSON data as it’s easier to deal with using JQuery: JQuery Docs – getJSON

    As far as getting PHP to understand what’s being requested, use a query string in your URL: request.php?r=make, or request.php?m=datsun&r=model, or request.php?ma=datsun&mo=280zx&r=year

    Then in PHP:

    switch($_GET['r']){
      case "make":
        //return request for makes here
      case "model":
        //return request for model here, checking for existence of make request and validity
      case "years":
        //return request for vehicle years, based on existence of other two variables.
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using wordpress. I make a ajax call with jQuery, PHP echos out a
I am building a wordpress site using jQuery with cycle plugin to cycle through
I am using the jQuery Isotope plugin for WordPress posts. I want to show
I am using the jQuery Zoomable maps Plugin for a WordPress site with two
I am using the jQuery dialog widget with the modal option over a wordpress
I'm using jQuery to show a success message after a form is submitted. The
I'm using Colorbox in my WordPress plugin to create a gallery of Flickr photos.
OK here goes, I'm using jQuery ajax to load post from inside a slider.
So I'm designing a website (using WordPress), and I want to use JQuery to
I have a custom developed WordPress plugin that is using jQuery 1.4 and for

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.