Mysql
 sql >> Base de données >  >> RDS >> Mysql

Modal ne charge pas en utilisant javascript dans php (CodeIgniter)

Essayez le code ci-dessous ; cela fonctionnera

public function insert($data) {
    // Inserting into your table
    // Calling model
    $done = $this->db->insert('sign_up', $data);

    // You can do something else here
    if($done) {
?>
        <script>$(document).ready(function(){$('#thankyouModal').modal('show')});</script>
        <div class="modal fade" id="thankyouModal" tabindex="-1" role="dialog">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="myModalLabel">Thank you for pre-registering!</h4>
                </div>
                <div class="modal-body">
                    <p>Thanks for getting in touch!</p>                     
                </div>    
            </div>
        </div>
    </div>
<?php
    }
}