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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:16:09+00:00 2026-05-19T01:16:09+00:00

session_start(); if(isset($_REQUEST[‘action’]) && $_REQUEST[‘action’]!=) if ($action == addToBasket) { $rmrradio1 = 3; $rmrradio2 =

  • 0
session_start();
if(isset($_REQUEST['action']) && $_REQUEST['action']!="")
if ($action == "addToBasket")
{
    $rmrradio1 = 3;
    $rmrradio2 = 5.5;
    $rmrradio2 = 16;
}

 

$(document).ready(function() { 
    $("input[type='radio']").click(function() { 
        var price = $(this).attr("value");
        var name =  $(this).attr("name");
        add_payment_value(price,name); 
    });  
});

function add_payment_value(price) { 
    // here you can use $.ajax function to add your 'price value' to your cart 
    $.ajax({ 
        type: "POST", 
        url: "make-payment.php"// file where you can add price to your database 
        data: "rmr"=+price+" &action=addtobasket ", 
        success: function(){} // return something on success 
    }); 
}  

I have written the code like this. This is for a shopping cart site. The above value just added with basket (add my cart) when click the radio button and also i want to know about the jquery I don’t know either this code is correct or not. But i need some one help to implement my project. Can any one give me a right code. Sorry if my q sounds unclear.

  • 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-19T01:16:10+00:00Added an answer on May 19, 2026 at 1:16 am

    Write:

    $(document).ready(function() {    
      $("input[type='radio']").click(function()
     {        
      var price = this.value;     
        var name = this.name;      
       add_payment_value(price,name);    
      });  
     }); 
    
    function add_payment_value(price,name) {  
    $.post("make-payment.php", { name: name, price: price } 
    ,
    
     function(data){
    
         alert("Data Loaded: " + data);
       });
    
    }
    

    You get the vars in the make-payment.php like this:

    $_POST['price'];
    
    $_POST['name'];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I execute this following code for example: cart.php?p=1&action=add <?php session_start(); if (isset($_GET['p']) &&
<?php session_start(); if(isset($_POST['sessionNum'])){ //Declare my counter for the first time $_SESSION['initial_count'] = $_POST['sessionNum']; $_SESSION['sessionNum']
here is the code <?php session_start(); if(!isset($_SESSION['user_name'])) { header('Location: login.php'); } $conn = mysql_connect(localhost,
I have the following pages: page1.php <?php if (isset($_GET['link'])) { session_start(); $_session['myvariable'] = 'Hello
I have a very simple test page for PHP session. <?php session_start(); if (isset($_SESSIONS['views']))
In my web admin area I have using very simple logic: session_start(); ob_start(); if(!isset($_SESSION['user'])){
So I have the index.php page. <?php session_start(); if (!isset($_SESSION['var1'])) { echo session not
<?php $prev_path = ./../../.; $dont_redirect = true; require_once ${prev_path}./config.php; session_start(); function http_digest_parse($txt){ $needed_parts =
session_start() should be the first line of web page. Dreamweaver's php templates should be
session_start(); //login page if(mysql_num_rows($result) != '0'){ // If match. session_register(username); // Craete session username.

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.