i am looking to fetch data from database stored in value form.As when i am treid to echo value it displays value which i don't want.
so when i echo country it displays AX where i am looking for Aland Islands is value is stored in database.
<form action="reg_page.php" id="regform">
Username:<input type="text" name="username">
Password:<input type="text" name="password">
Confirm Password:<input type="text" name="conpassword">
Country:
<select id="city" name="city" required>
<option value="AX">Aland Islands</option>
<input type="submit">
</form>
include("db.php"); // include the connection object from the DBConnection.php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$inUsername = $_POST["username"];
$inPassword = $_POST["password"];
$encryptPassword = password_hash($inPassword, PASSWORD_DEFAULT);
$inCountry = $_POST["city"];
$stmt = $db->prepare("INSERT INTO users(username,password,center) VALUES(?, ?,?)");
$stmt->bind_param("sss", $inUsername , $encryptPassword, $inCountry);
$stmt->execute();
$result = $stmt->affected_rows;
$stmt -> close();
$db -> close();
if($result > 0)