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

  • Home
  • SEARCH
  • 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 9133875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:33:40+00:00 2026-06-17T08:33:40+00:00

I want to send 2 values to php using ajax. When I use one

  • 0

I want to send 2 values to php using ajax. When I use one variable, it works fine, but when I use 2 variables, the query no longer works in the php file.

$.ajax({ 
    url:'page.php?suplier_id='+suplierNameMain+'&quality_id='+qualityNameMain,
        method:'GET', success:function(data) {
});

If I use only supplier_id, everything works great.

P.S qualityNameMain shows correct value in console.log()

  • 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-17T08:33:41+00:00Added an answer on June 17, 2026 at 8:33 am

    I’m sure it’s not related, but there is no reason to build your own query string. Use the data property instead, which as Barmar points out will properly URL encode your parameters:

    $.ajax({
        url: 'page.php',
        data: {
            'suplier_id': suplierNameMain,
            'quality_id': qualityNameMain
        },
        success: function(data) {
            /* Whatever */
        }
    });
    

    Note that method from your example isn’t valid for jQuery (there is a type setting to switch between GET and POST), but GET is the default so you might as well exclude it altogether.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to send a variable using jquery and ajax to php script. Then
I have login form which i want to send via ajax using serialize but
Im using Ajax to send values to a PHP script which writes some value
I am using the ajax post method to send values from aspx to php.in
I have form and I want to send values from it with ajax to
Hello Sir i want send list of data to php server i use following
I am using Ajax POST method to send data, but i am not able
I want to send multiple values to a different page using a href link.
I'm trying to get all loop results into one then using ajax to send
I have a .php file on the server. I want it to send values

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.