php bootstrap error with modal <p>I have the below scripts running but once I add a remote file link for the modal, it will not update. </p> <ol> <li>I want to edit from a modal</li> <li>within that modal window, confirm the data was submitted successfully</li> <li>on close, refresh the crud. </li> </ol> <p>Any help will be appreciated.</p> <p>I'm modifying the class.crud.php file to include this line</p> <p>removing</p> <pre><code>&lt;a href="edit-data.php?edit_id=&lt;?php print($row['id']); ?&gt;"&gt;&lt;i class="glyphicon glyphicon-edit"&gt;&lt;/i&gt;&lt;/a&gt; </code></pre> <p>replacing with</p> <pre><code>&lt;a data-toggle="modal" class="btn btn-info" href="edit-data.php?edit_id=&lt;?php print($row['id']); ?&gt;" data-target="#myModal"&gt;&lt;i class="glyphicon glyphicon-edit"&gt;&lt;/i&gt;&lt;/a&gt; </code></pre> <p>INDEX.PHP</p> <pre><code>&lt;?php include_once 'dbconfig.php'; ?&gt; &lt;?php include_once 'header.php'; ?&gt; &lt;div class="clearfix"&gt;&lt;/div&gt; &lt;div class="container"&gt; &lt;table class='table table-bordered table-responsive'&gt; &lt;tr&gt; &lt;th&gt;#&lt;/th&gt; &lt;th&gt;First Name&lt;/th&gt; &lt;th&gt;Last Name&lt;/th&gt; &lt;th&gt;E - mail ID&lt;/th&gt; &lt;th&gt;Contact No&lt;/th&gt; &lt;th colspan="2" align="center"&gt;Actions&lt;/th&gt; &lt;/tr&gt; &lt;?php $query = "SELECT * FROM tblUsers"; $records_per_page=10; $newquery = $crud-&gt;paging($query,$records_per_page); $crud-&gt;dataview($newquery); ?&gt; &lt;tr&gt; &lt;td colspan="7" align="center"&gt; &lt;div class="pagination-wrap"&gt; &lt;?php $crud-&gt;paginglink($query,$records_per_page); ?&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;!-- Modal --&gt; &lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;/div&gt; &lt;!-- /.modal-content --&gt; &lt;/div&gt; &lt;!-- /.modal-dialog --&gt; &lt;/div&gt; &lt;!-- /.modal --&gt; &lt;?php include_once 'footer.php'; ?&gt; </code></pre> <p>CLASS.CRUD.PHP</p> <pre><code> public function update($id,$fname,$lname,$email,$level_id) { try { $stmt=$this-&gt;db-&gt;prepare("UPDATE tblUsers SET firstname=:fname, lastname=:lname, email=:email, level_id=:contact WHERE id=:id "); $stmt-&gt;bindparam(":fname",$fname); $stmt-&gt;bindparam(":lname",$lname); $stmt-&gt;bindparam(":email",$email); $stmt-&gt;bindparam(":contact",$level_id); $stmt-&gt;bindparam(":id",$id); $stmt-&gt;execute(); return true; } catch(PDOException $e) { echo $e-&gt;getMessage(); return false; } } public function delete($id) { $stmt = $this-&gt;db-&gt;prepare("DELETE FROM tblUsers WHERE id=:id"); $stmt-&gt;bindparam(":id",$id); $stmt-&gt;execute(); return true; } /* paging */ public function dataview($query) { $stmt = $this-&gt;db-&gt;prepare($query); $stmt-&gt;execute(); if($stmt-&gt;rowCount()&gt;0) { while($row=$stmt-&gt;fetch(PDO::FETCH_ASSOC)) { ?&gt; &lt;tr&gt; &lt;td&gt;&lt;?php print($row['id']); ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php print($row['firstname']); ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php print($row['lastname']); ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php print($row['email']); ?&gt;&lt;/td&gt; &lt;td&gt;&lt;?php print($row['level_id']); ?&gt;&lt;/td&gt; &lt;td align="center"&gt; &lt;a href="edit-data.php?edit_id=&lt;?php print($row['id']); ?&gt;"&gt;&lt;i class="glyphicon glyphicon-edit"&gt;&lt;/i&gt;&lt;/a&gt; &lt;/td&gt; &lt;td align="center"&gt; &lt;a href="delete.php?delete_id=&lt;?php print($row['id']); ?&gt;"&gt;&lt;i class="glyphicon glyphicon-remove-circle"&gt;&lt;/i&gt;&lt;/a&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php } } else { ?&gt; &lt;tr&gt; &lt;td&gt;Nothing here...&lt;/td&gt; &lt;/tr&gt; &lt;?php } } </code></pre> <p>EDIT-DATA.PHP</p> <pre><code>&lt;?php include_once 'dbconfig.php'; if(isset($_POST['btn-update'])) { $id = $_GET['edit_id']; $fname = $_POST['firstname']; $lname = $_POST['lastname']; $email = $_POST['email']; $level_id = $_POST['level_id']; if($crud-&gt;update($id,$fname,$lname,$email,$level_id)) { $msg = "&lt;div class='alert alert-info'&gt; &lt;strong&gt;WOW!&lt;/strong&gt; Record was updated successfully &lt;a href='index.php'&gt;HOME&lt;/a&gt;! &lt;/div&gt;"; } else { $msg = "&lt;div class='alert alert-warning'&gt; &lt;strong&gt;SORRY!&lt;/strong&gt; ERROR while updating record ! &lt;/div&gt;"; } } if(isset($_GET['edit_id'])) { $id = $_GET['edit_id']; extract($crud-&gt;getID($id)); } ?&gt; &lt;?php include_once 'header.php'; ?&gt; &lt;div class="clearfix"&gt;&lt;/div&gt; &lt;div class="container"&gt; &lt;?php if(isset($msg)) { echo $msg; } ?&gt; &lt;/div&gt; &lt;div class="clearfix"&gt;&lt;/div&gt; &lt;br /&gt; &lt;div class="modal-header" id="myModal"&gt; &lt;form method='post'&gt; &lt;div class="form-group"&gt; &lt;label for="email"&gt;First Name:&lt;/label&gt; &lt;input type='text' name='firstname' class='form-control' value="&lt;?php echo $firstname; ?&gt;" required&gt; &lt;/div&gt; &lt;div class="form-group"&gt; &lt;label for="email"&gt;Last Name:&lt;/label&gt; &lt;input type='text' name='lastname' class='form-control' value="&lt;?php echo $lastname; ?&gt;" required&gt; &lt;/div&gt; &lt;div class="form-group"&gt; &lt;label for="email"&gt;Email:&lt;/label&gt; &lt;input type='text' name='email' class='form-control' value="&lt;?php echo $email; ?&gt;" required&gt; &lt;/div&gt; &lt;div class="form-group"&gt; &lt;label for="email"&gt;Level ID:&lt;/label&gt; &lt;input type='text' name='level_id' class='form-control' value="&lt;?php echo $level_id; ?&gt;" required&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt; &lt;button type="submit" class="btn btn-primary" name="btn-update"&gt;Save changes&lt;/button&gt; &lt;/div&gt; &lt;/form&gt; &lt;/div&gt; </code></pre>