drop down php form retrieve data from database
<!DOCTYPE html>
<html>
<head>
<title>PHP Retrieve Data from MySQL using Drop Down Menu</title>
</head>
<body>
<form>
City:
<select>
<option disabled selected>-- Select City --</option>
<?php
include "dbConn.php"; // Using database connection file here
$records = mysqli_query($db, "SELECT city_name From tblcity"); // Use select query here
while($data = mysqli_fetch_array($records))
{
echo "<option value='". $data['city_name'] ."'>" .$data['city_name'] ."</option>"; // displaying data in option menu
}
?>
</select>
</form>
<?php mysqli_close($db); // close connection ?>
</body>
</html>
Also in PHP:
- check for keys in array
- Update Query in Codeigniter Using Multiple Where Condition
- css date function
- cosole log php
- exception handling php databse
- check php for errors
- create array from string with commas php
- check if string includes substring php
- download laravel composer
- client_ip() function php
- add checkbox in server side datatable laravel
- disable register auth laravel
- Fatal error: Allowed memory size of 1073741824 bytes exhausted (trie
- display errr php
- PHP Fatal error: Composer detected issues in your platform: Your Composer depen dencies require a PHP version ">= 7.3.0". You are running 7.2.34.
- @ dev: `npm run development` npm ERR! Exit status 2 laravel 8
- f j y date format
- codeigniter db last insert id
- base64 dencode GET variables in PHP
- date("l") php
- all cache clear laravel
- find someone geo php
- Expression #1 of ORDER BY contains aggregate function and applies to the result of a non-aggregated query laravel
- autoload php multiple spl_autoload_register