Populate dropdown from Mysql

Hi there I am trying to make a drop down from database , but it show nothing

<?php
		//error_reporting(E_ALL);
		
		require_once("dbase.php");
		$result=mysqli_query($conn, "sellect * from costumers");
		while($row=mysqli_fetch_array($result)){
		
		echo "
		<option value='".$row["customer"]."'> '".$row["customer"]."'</option>
			";
		}
		?>

Here is my mysql dump:

-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 12, 2018 at 12:13 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `water`
--

-- --------------------------------------------------------

--
-- Table structure for table `costumers`
--

CREATE TABLE IF NOT EXISTS `costumers` (
  `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  `customer` varchar(255) NOT NULL,
  `address` varchar(255) NOT NULL,
  `area` varchar(255) NOT NULL,
  `maxcredit` varchar(50) NOT NULL,
  `station` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `costumers`
--

INSERT INTO `costumers` (`id`, `customer`, `address`, `area`, `maxcredit`, `station`) VALUES
(1, 'Test1 Customer', 'blk 9 lot 8', 'Farcon', '300', '02356'),
(2, 'Test2 Custmoer', 'Blk 7 lot 56', 'Gardenhomes', '300', '02356'),
(3, 'Test3 Customer', 'blk 9 lot 67', 'Farcon', '300', '02356'),
(4, 'Test4 Customer', 'blk 898 lot 56', 'Garden homes', '300', '02356');

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Any help would be gold thank you

SELECT has only one L in it.
Should “costumers” be “customers”? Watch your spelling. :slight_smile:

Also, because you are only using the customer field there is no need to select everything (*). Select only the fields you need.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.