Saturday, January 23, 2016

Bangla PHP OOP and MySQLi CRUD Tutorial (Part-02)

Related Code(index.php):
include 'inc/header.php'; 
include "config.php";
include "Database.php";

 $db = new Database();
 $query = "SELECT * FROM tbl_user";
 $read = $db->select($query);

 echo "<span style='color:green'>".$_GET['msg']."</span>";

<table class="tblone">
 <th width="10%">Serial</th>
 <th width="35%">Name</th>
 <th width="25%">Email</th>
 <th width="15%">Skill</th>
 <th width="15%">Action</th>
<?php if($read){?>
while($row = $read->fetch_assoc()){
 <td><?php echo $i++ ?></td>
 <td><?php echo $row['name']; ?></td>
 <td><?php echo $row['email']; ?></td>
 <td><?php echo $row['skill']; ?></td>
 <td><a href="update.php?id=<?php echo urlencode($row['id']); ?>">

<?php } ?>
<?php } else { ?>
<p>Data is not available !!</p>
<?php } ?>
<a href="create.php">Create</a>
<?php include 'inc/footer.php'; ?>

How to practice tutorials…

  • Make a team with your friends (Member should be 4/5).
  • Start to practice one tutorial series along with them.
  • Don’t try to collect source code. Type the code while watching the tutorial.
  • If you face any problem, discuss with team members to solve quickly.