السلام عليكم ورحمة الله وبركاتة
<div class="form-group">
<label for="category" class="col-sm-2 control-label"> أختر التصتيف</label>
<div class="col-sm-5">
<select class="form-control" name="category" id="category">
<option value="">أختر التصتيف</option>
<?php
$cat = mysqli_query($conn, "SELECT * FROM category");
while($cate = mysqli_fetch_assoc($cat)){
echo '<option value="'.$cate['category'].'">'.$cate['category'].'</option>';
}
?>
</select>
</div>
</div>
Notice: Undefined variable: conn in C:\xampp\htdocs\post\admin\new-post.php on line 128
Warning: mysqli_query() expects parameter 1 to be mysqli, null given in C:\xampp\htdocs\post\admin\new-post.php on line 128
Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, null given in C:\xampp\htdocs\post\admin\new-post.php on line 129