Trying to post a variable from js to php within a if clause



I am trying to post a variable within a if clause, but the php document is not receiving the variable. Here is some Code:

JS:

if(data.details.payment_type =="sofo")    {
    var orderid = data.details.order_id;
    $.post("LinkToPhpDocument.php", { orderidvalue: orderid });
    window.location.replace("LinkToPhpDocument.php");
}

PHP

$orderID = $_POST['orderidvalue'];

Related to : Trying to post a variable from js to php within a if clause

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .