title: Front end form which echoes data and allows user to update content through various input fields?
body: <p>I'm fairly new to PHP &amp; server side script as most of my work has been in front end development, so I'd be really grateful for any guidance or advice.</p>
  
  <p>I've started to develop a small-scale product kiosk system, where a user can look up various products and view price and availability information (no need for self service or any kind of purchasing set up as it's primary use will be to list the products). For this specific system there will only be a set number of products, no more or less and the only product info that will change will be the availability and price (so there will be no need to ADD or DELETE any of the products). I've been looking into CRUD but as I only need to update the existing data through a form I was a little unsure with how to approach it.</p>
  
  <p>So far, I have a MySQL database set up with a products table with all the products and information inserted.</p>
  
  <p>In my index.php I created a basic table which echoes the data into the table.</p>
  
  <p>index.php:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
  &lt;style&gt;
  body {font-family: verdana; font-size: 12px; text-transform:capitalize;} 
  #content {margin: 20px;}
  table,th,td {border:1px solid #d1d1d1; padding: 12px;}
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div id="content"&gt;
  
  &lt;h1&gt;Product Details&lt;/h1&gt;
  
  &lt;?php
  
  $con=mysqli_connect("SERVERINFO","DATABASE","USER","PASS");
  // Check connection
  if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }
  
  
  $result = mysqli_query($con,"SELECT * FROM products");
  
  echo "&lt;table border='1' cell-padding='2'&gt;
  &lt;tr&gt;
  &lt;th&gt;ID&lt;/th&gt;
  &lt;th&gt;Prodcut&lt;/th&gt;
  &lt;th&gt;Price&lt;/th&gt;
  &lt;th&gt;Availabitly&lt;/th&gt;
  &lt;/tr&gt;";
  
  while($row = mysqli_fetch_array($result))
    {
    echo "&lt;tr&gt;";
    echo "&lt;td&gt;" . $row['id'] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row['product'] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row['price'] . "&lt;/td&gt;";
    echo "&lt;td&gt;" . $row['availabitly'] . "&lt;/td&gt;";
    echo "&lt;/tr&gt;";
    }
  echo "&lt;/table&gt;";
  
  mysqli_close($con);
  ?&gt; 
  
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This works fine, but I'm aiming to progress by creating an admin section where a user can change the content by either entering a new price via an input field or changing the availability through a drop down option directly on the table.</p>
  
  <p>I'm not asking anyone to write the code for me as the main reason I'm undergoing this is to  learn more and hopefully be pointed in the right direction.</p>
  
  <p>Thanks.</p>