title: take database user,pass,name and host info from user's and want to update a database column info
body: <p>I am new here and noob in programming.
  I have created a script that can change a database column but now I want to take database login info from user's and the changed value from user's when they give all info correctly the script changed the database column info which was given by the user's.</p>
  
  <p>Here is my login.html source code :</p>
  
  <pre><code>&lt;html&gt;
  &lt;center&gt;
  
  &lt;form action="db.php" method="post"&gt;
  DB Host:     &lt;input type="text" name="host"&gt;&lt;br&gt;
  DB Username: &lt;input type="text" name="usr"&gt;&lt;br&gt;
  DB Password: &lt;input type="password" name="psw"&gt;&lt;br&gt;
  DB Name:     &lt;input type="text" name="dbname"&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
  Admin changed Username: &lt;input type="text" name="admusr"&gt;&lt;br&gt;
  Admin Changed Password: &lt;input type="password" name="admpsw"&gt;&lt;br&gt;
  &lt;input type="submit"&gt;
  &lt;/form&gt;
  &lt;/center&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and here is my db.php source code which can update database column info manually</p>
  
  <pre><code>&lt;?php
  
  $servername = "localhost";
  $username = "admin";
  $dbname = "mydb";
  $password = "1234";
  
  // Create connection
  $conn = new mysqli($servername, $username, $password);
  
  
  // Check connection
  if ($conn-&gt;connect_error) {
      die("Connection failed: " . $conn-&gt;connect_error);
  }
  echo "Connected successfully";
  mysqli_select_db($conn,"$dbname");
  
  
  $sql = "UPDATE admins SET user_login='admin1',user_pass='1234'  WHERE id=1";
  
  
  if ($conn-&gt;query($sql) === TRUE) {
      echo "Record updated successfully";
  } else {
      echo "Error updating record: " . $conn-&gt;error;
  }
  
  
  $conn-&gt;close();
  
  ?&gt;
  </code></pre>
  
  <p>Is it possible to take value from user's and changed the database column info?
  Sorry for bad english.</p>