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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:23:12+00:00 2026-06-11T16:23:12+00:00

I have spent the day studying up on jquery because I think it will

  • 0

I have spent the day studying up on jquery because I think it will allow me to do this. I have a paypal form and I want the “onClick” button to send this field to my sql table

<input type="hidden" name="amount" id="amount" value="0.05">

Meanwhile my PayPal button is doing this:

<input class="btn btn-primary" onClick="send()" type="submit" value="Subscribe">

How can I pass this value to my process_plan.php? So far I have this but it’s hanging and not working.

function send() {
    var id = $('#amount').val();
    var result;
    $.ajax({
        type: "POST",
        url: "process_plan.php",
        data: {
            "amount" : amount
        },
        async: true,
        dataType: "html",
        success: function(response) { 
            result = response;
        },
        error: function(response) {
            alert("Oh no! An error occured!");
        }
    });
    return result;
}

I apologize if the code is really wonky – really my first day studying up on Jquery and Ajax.

  • 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-11T16:23:13+00:00Added an answer on June 11, 2026 at 4:23 pm

    Don’t know if that is the problem, but I think you have a little mistake in your code.

    Please try :
    ...
    data: {
    amount : "amount"
    },
    ...

    In case that amount is a var too, delete the “

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

Sidebar

Related Questions

I have spent about half a day searching for an answer to this question
I have spent the day trying to fathom this one out (needless to say
I have spent all day trying to solve this with no satisfying results. I
I have spent a day and a half trying to resolve this issue. Bascially
I have spent the entire day trying to get this code snippet to work:
I've spent over a day trying to figure this out, I have looked at
Okay, so i have spent all day searching the web for why this is
I have spent the whole day trying to make a script which on submit
Have spent an hour trying to solve this - but to no avail. I'm
I have spent hours in this problem and my fellows couldn't help me out.

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.