How to get two values in AJAX with same condition?
How to get two values in ajax :
Source-code :
1)
database.php
- <?php
- $servername = "localhost";
- $username = "root";
- $password = "";
- $dbname = "kolupadi_extension_order";
- $conn = mysqli_connect($servername, $username, $password, $dbname );
- if(!$conn)
- {
- echo "Try after Sometimes" .mysqli_connect_error();
- }
- ?>
2) upgrade.php (Form)
3)
ajax_data.php :
FYI => The column return the price, same how can i return my shipping weight,
I have both price and shipping_weight,
Now my price ajax look like :
- if(isset($_POST['old']) && isset($_POST['new'])){
- $old = $_POST['old'];
- $new = $_POST['new'];
- if($old=='three_compact'&&$new=='five_compact'){ // 6250111
- echo "2500";
- }
- elseif($old=='three_compact'&&$new=='five_regular') //6250112
- {
- echo "2500";
- }
From the above code return price as
2500 and i need to return also shipping_weight as
10.
How to pass two field values in same ajax condition?