I want to execute php code base on radio result html example below.
<form>
    <input type="radio" name="type" value="0" checked />Staff
    <input type="radio" name="type" value="1" />Client
</form>
in php I can do this
<?php
    if($_POST['type'] == 1){
        echo "some of my php code";
    } else {
        echo "my second option php code";
    }
?>
but no idea how to implement that code in javascript using onclick
 
     
    