narendra narendra - 1 year ago 106
Ajax Question



Answer Source

Firstly make ajax to separate PHP page where you will access the radio value. Also make alert after you receive the data.

    url : "post.php",
    type : "POST",
    data: pass_data,
    success : function(data) {
        // alert radio value here

Crete a separate PHP file post.php where you access radio input. Since you are making POST request you need to use $_POST instead of $_GET to get radio button value.

    $radio1 = $_POST['radio1'];
    echo $radio1;