Handling AJAX requests
===

I have a simple question, I am currently handling php / ajax requests in the current way.
    

    // ajax_requests.php

    <?php
     if(isset($_POST['ajaxvar'] == send)){
       // send timestamp
     }
     if(isset($_POST['ajaxvar'] == get)){
       // return get
     }
    ?>

Is there a better way of coping with these requests? Other than this somewhat bloated way of handling with requests.

Thanks