插入值时重定向无效?

view:

<script>
        $(document).ready(function(){
            $("#verify").click(function(event){
                event.preventDefault()
                mobile = $("#mobile").val();
                uid = $("#uid").val();
                $.ajax({
                    type:"POST",
                    data:{"mobile":mobile, "uid":uid},
                    url:"<?php echo base_url(); ?>quiz/mobile_verification",
                    success:function(data){
                        alert(data);
                    }
                });
            });
        });
    </script>
    <li><a href="javascript:void(0)" data-toggle="modal" data-target="#mobiles">Result</a></li>
    <div id="mobiles" class="modal fade" role="dialog">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-body">
            <button type="button" class="close" data-dismiss="modal">&times;</button>
            <p style="text-align:center;color:red;">Your mobile number is not verify</p>
            <p style="text-align:center;color:red;">Please enter your mobile number for verification to see result.</p>
            <input type="hidden" name="uid" id="uid" value="<?php echo $uid; ?>">
            <center>Enter Your Valid Number :<input type="text" name="mobile" id="mobile" onkeyup="check(); return false;"/>
            <p id="message" style="margin-bottom: 0px;"></p>
            <input type="submit" name="verify" id="verify" class="btn btn-success" value="Verify" style="margin-top:10px;"/></center>
          </div>
        </div>
      </div>
    </div>

controller:

public function mobile_verification()
{
    $data['logg'] = $this->session->userdata('logged_in');
    $mobile = $this->input->post('mobile');
    $uid = $this->input->post('uid');
    $password = rand(10,10000);

    $data = array(
                "uid"=>$uid,
                "mobile"=>$mobile,
                "password"=>$password,
                );
    $sql = $this->db->insert('mobile_verify',$data);
    if($sql = true)
    {
        redirect("quiz/verify");
    }
    else
    {
        echo "error";
    }
}

In my view I have create a model over result for mobile verification. Now , when I put mobile number inside text box value will store into database but it not redirect. Inside redirect I am using bulk sms process through which I am sending message to client. So, How can I do this ?Please help me.

Thank You

You are using ajax for mobile varification thats why you can not redirect it from there

$.ajax({
        type:"POST",
        data:{"mobile":mobile, "uid":uid},
        url:"<?php echo base_url(); ?>quiz/mobile_verification",
        success:function(data){
                        window.location.href= '<?php echo base_url(); ?>quiz/verify';//redirect from here or use $.reload() function
                    }
     });