views/edit_view File in CodeIgniter 3
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="ie-edge">
<title>Edit View</title>
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/css/bootstrap.min.css">
</head>
<body>
<div class="jumbotron">
<h1 align="center">CRUD CI APP</h1>
</div>
<div class="container">
<h1 align="center">Edit Product</h1>
<form action="<?php echo base_url(); ?>Crud/update/<?php echo $singleProduct->id; ?>" method="post">
<div class="form-group">
<label for="name">Name</label>
<input type="text" name="name" placeholder="Enter your name" class="form-control" value="<?php echo $singleProduct->name; ?>">
</div><br>
<div class="form-group">
<label for="price">Price</label>
<input type="text" name="price" placeholder="Enter your price" class="form-control" value="<?php echo $singleProduct->price; ?>">
</div><br>
<div class="form-group">
<label for="quantity">Quantity</label>
<input type="text" name="quantity" placeholder="Enter your quantity" class="form-control" value="<?php echo $singleProduct->quantity; ?>">
</div><br>
<input type="submit" name="edit" value="Update" class="btn btn-primary">
</form>
</div>
<pre>
<?php print_r($singleProduct); ?>
</pre>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js" integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js" integrity="sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy" crossorigin="anonymous"></script>
</body>
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
Comments
Post a Comment