Question: I'm new in Yii Framework. I want to check user exists or not with ajax.

**view file**

```
<form method="post" action="<?php echo $baseUrl;?>/persons/login" role="form"><br>
    <div style="display: block;margin-left:14%">
        <div>İstifadəçi adı</div>
        <div>
            <input type="text" name="istiad" autocomplete="off" role="textbox" tabindex="1">
        </div>
        <div>Parol</div>
        <div>
            <input type="password" name="parol" autocomplete="off" role="textbox" maxlength="20" tabindex="2"><br>
        </div>
        <?=CHtml::button('daxil ol', ['submit'=>['persons/login', 'i'=>1]]); ?>
    </div>
</form>

```

### EDIT

[error must looks like this](http://i.stack.imgur.com/KUIW1.png)

how can i do this ?
 thanks!

Answer: 
Try this -

```
android.os.Process.killProcess(android.os.Process.myPid());

```

It will **destroy** the app.

Alternatively, you can do this -

```
Intent homeIntent = new Intent(Intent.ACTION_MAIN);
homeIntent.addCategory( Intent.CATEGORY_HOME );
homeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(homeIntent);

```

This will take you to the home screen and the current processes will be **paused**.
This question was already discussed here : [How to quit android application programmatically](https://stackoverflow.com/questions/6330200/how-to-quit-android-application-programmatically)

You should let the OS decides when the resources should be freed or not. Using all other methods can lead you to not stable state like : not saving data, not calling onStop(), etc... You should be really careful forcing the app to be closed.

You can have some details about closing your application yourself here : [Is quitting an application frowned upon?](https://stackoverflow.com/questions/2033914/quitting-an-application-is-that-frowned-upon)