-
Video : Showing all the results in Codeigniter 4
-
Video : Update the record in Codeigniter 4
-
Video : Delete operation in Codeigniter 4
-
Video : Adding Bootstrap 4 in Codeigniter 4 in the Crud Application
-
Video : Create the form in Codeigniter 4 and insert the record
-
Video : Conclusion of CRUD operation in codeigniter 4
Delete operation in Codeigniter 4
Please Login and enroll in this course to view the lesson.
Delete operation in Codeigniter 4, yes you always perform the delete operation in any application because its the part of the CRUD operation.
<div class="container">
<div class="row">
<div class="col-md-12">
<?php if (!empty($message) && isset($message)): ?>
<?php echo $message; ?>
<?php endif; ?>
<br>
<a class="btn btn-success" href="<?php echo site_url('students/newstudent'); ?>">New User</a>
<h1>All Students</h1>
<table class="table">
<th>ID</th>
<th>Name</th>
<th>Subject</th>
<th>Date</th>
<th>Edit</th>
<th>Delete</th>
<?php if(count($students) > 0): ?>
<?php foreach ($students as $myStudent): ?>
<tr>
<td>
<?php echo $myStudent['s_id'];?>
</td>
<td>
<?php echo $myStudent['s_name'];?>
</td>
<td>
<?php echo $myStudent['s_subject'];?>
</td>
<td>
<?php echo $myStudent['s_date'];?>
</td>
<td>
<a class="btn btn-info" href="<?php echo site_url('students/editstudent/'.$myStudent['s_id'])?>">Edit</a>
</td>
<td>
<a class="btn btn-danger" href="<?php echo site_url('students/delete/'.$myStudent['s_id'])?>">Delete</a>
</td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</table>
</div>
</div>
</div>