I am using ajax calls for getting information from php files and I am new to these. I have 7 elemnts in my html to be clicked and fire an ajax call. I created 7 different php files to do stuff for these ajax calls, like that: 

*html part:*

```
<a style="cursor:pointer;" id="one"></a>
<a style="cursor: pointer;" id="two"></a>
<a style="cursor: pointer;" id="three">></a>
       .
       .
       .   // 7 elements goes on like this.

```

*javascript part:*

```
$("#one").click(function(){
    $.ajax({
       url: '../one.php',
       dataType: 'html',
       success: function(result){
        var res = (result).replace( /^\D+/g, '');
        switch(res) {
        case '1':
        window.location.href = "http://www.......com";
        break;
        case '2':
        alert('hgjgkj');
        break;
        }}
    });});

```

And 7 java parts for each element. Then 7 php part for each element.
What I am asking is that if there is any way to handle these calls in just one php file.
(For example assigning a name, variable or id to the ajax call and check in php file which call is it).
Like that (in php):

```
if(the call from html_element_one){
// do stuff
}
elseif(the call from html_element_two){
// do stuff
}
...and goes on

```