Example #1
0
		<tr>
			<td>Price</td>
			<td><input type='text' name='price' class='form-control' required></td>
		</tr>
		 
		<tr>
			<td>Description</td>
			<td><textarea name='description' class='form-control'></textarea></td>
		</tr>
		 
		<tr>
			<td>Category</td>
			<td>
			<?php 
// read the categories from the database
$stmt = $category->readAll_WithoutPaging();
// put them in a select drop-down
echo "<select class='form-control' name='category_id'>";
echo "<option>Select category...</option>";
// loop through the caregories
while ($row_category = $stmt->fetch(PDO::FETCH_ASSOC)) {
    extract($row_category);
    echo "<option value='{$id}'>{$name}</option>";
}
echo "</select>";
?>
			</td>
		</tr>
		 
		<tr>
			<td>Active Until:</td>