Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <select>
- <option>Choose ID</option>
- <?php
- $con = new mysqli('localhost', 'root', '', 'mysqli_crud');
- if ($con->connect_errno > 0){
- die('Could not connect: ' .connect_error());
- }
- $sqli_id = mysqli_query($con, "SELECT * FROM tbl_artikel");
- if(mysqli_num_rows($sqli_id) == 0){
- echo "<option>No Data Here</option>";
- }else{
- while($row = mysqli_fetch_assoc($sqli_id)){
- echo "<option value=".$row['id'].">".$row['id']."</option>";
- }
- }
- ?>
- </select>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement