How do you connect bootstrap form to database
<p>I have created a bootstrap form ,but it won't connect to the database. After filling up the forms, it gives me an undefined index error. I have no idea what to do. Can you help me? I'm so lost. </p>

<pre><code>&lt;form name="input" method="post" action="addtodatabase.php"&gt;


&lt;form&gt;
&lt;div class="form-group"&gt;
  &lt;label for="Book_Number"&gt;Book Number&lt;/label&gt;
  &lt;input type="text" class="form-control" id="Book_Number"  placeholder="Enter Book Number"&gt;
&lt;/div&gt;

 &lt;div class="form-group"&gt;
  &lt;label for="Book_Title"&gt;Book Title&lt;/label&gt;
  &lt;input type="text" class="form-control" id="Book_Title" placeholder="Enter Book Title"&gt;
&lt;/div&gt;

 &lt;div class="form-group"&gt;
  &lt;label for="Book_Description"&gt;Book Description&lt;/label&gt;
  &lt;input type="text" class="form-control" id="Book_Description" placeholder="Enter Book Description"&gt;
&lt;/div&gt;

 &lt;div class="form-group"&gt;
  &lt;label for="Author"&gt;Author&lt;/label&gt;
  &lt;input type="text" class="form-control" id="Author" placeholder="Enter Author"&gt;
&lt;/div&gt;

 &lt;div class="form-group"&gt;
  &lt;label for="Publisher"&gt;Publisher&lt;/label&gt;
  &lt;input type="text" class="form-control" id="Publisher" placeholder="Enter Publisher"&gt;
 &lt;/div&gt;

 &lt;div class="date"&gt;
  &lt;label for="Year_Published"&gt;Year Published&lt;/label&gt;
  &lt;input type="date" class="form-control" id="Year_Published" placeholder="Enter Year Published"&gt;
 &lt;/div&gt;

&lt;br&gt;    
&lt;input type="submit"&gt;   &lt;input type="reset"&gt;&lt;/center&gt;
&lt;/form&gt;
</code></pre>

<p>The undefined index error refers to Book_Number etc.</p>

<pre><code> &lt;?php
 $connection = mysql_connect ('localhost','root','');
mysql_select_db('ABC_Library');

$Book_Number =      $_POST ['Book_Number'];
$Book_Title =       $_POST ['Book_Title'];
$Book_Description=  $_POST['Book_Description'];
$Author =           $_POST ['Author'];
$Publisher  =       $_POST['Publisher'];
$Year_Published =   $_POST['Year_Published'];


$query = 
"INSERT INTO Theology_Books
(Book_Number,Book_Title,Book_Description,Author,Publisher,Year_Published)

values

('$Book_Number','$Book_Title','$Book_Description','$Author','$Publisher','$Y    ear_Published')";

$result = mysql_query($query);
Echo "Database Saved"; 
mysql_close($connection);
?&gt;
</code></pre>