title: Displaying data from database in bootstrap modal form(PHP&MySQL)
body: <p>I am new to both bootstrap and php. I have created a registration modal form to register users for my site and it registers perfectly. However, I would like to retrieve a users details from my database based on their User ID and display their details in a registration form for them to edit and update.
  What I don't know how to do is display the records in the form fields...
  Please help by providing a simple syntax for this.</p>
  
  <p>I am using PHP and MySql</p>
  
  <p><strong>This is my modal form</strong></p>
  
  <pre><code>&lt;div class="modal fade" id="updatelecModal" tabindex="-1" role="dialog" aria-labelledby="updatelecModalLabel" aria-hidden="true"&gt;
        &lt;div class="modal-dialog"&gt;
          &lt;div class="modal-content"&gt;
            &lt;div class="modal-header"&gt;
              &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;/button&gt;
              &lt;/div&gt;
            &lt;div class="modal-body"&gt;
              &lt;!--End of modal--&gt;
  
              &lt;!-- Start of form--&gt;
  
              &lt;form id="updatelecForm" class="form-horizontal" role="form" method="post" action="#" nonvalidate&gt;
                   &lt;div class="form-group"&gt;
                      &lt;label for="student_id" class="col-sm-3 control-label"&gt;Lecturer ID&lt;/label&gt;
                      &lt;div class="col-lg-9"&gt;
                      &lt;input type="text" class="form-control" name="lec_id" required placeholder="Enter User ID"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  
                  &lt;div class="form-group"&gt;
                      &lt;label class="col-lg-3 control-label"&gt;Full name&lt;/label&gt;
                      &lt;div class="col-lg-4"&gt;
                          &lt;input type="text" class="form-control" name="firstName" required placeholder="First name" /&gt;
                      &lt;/div&gt;
                      &lt;div class="col-lg-4"&gt;
                          &lt;input type="text" class="form-control" name="lastName" required placeholder="Last name" /&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="form-group"&gt;
                      &lt;label for="email" class="col-sm-3 control-label"&gt;Email&lt;/label&gt;
                      &lt;div class="col-lg-9"&gt;
                      &lt;input type="email" class="form-control" name="lec_email" required placeholder="####@##.com"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                      &lt;label class="col-xs-3 control-label" name="lec_gender"&gt;Gender:&lt;/label&gt;
  
                      &lt;label class="radio-inline control-label"&gt;
                          &lt;input type="radio" name="optionsRadio" id="gender" value="Male"&gt;Male
                      &lt;/label&gt;
  
                      &lt;label class="radio-inline control-label"&gt;
                        &lt;input type="radio" name="optionsRadio" id="gender" value="Female"&gt;Female
                      &lt;/label&gt;
  
                      &lt;div class="form-group"&gt;
                      &lt;label for="password" class="col-sm-3 control-label"&gt;Password&lt;/label&gt;
                      &lt;div class="col-sm-7"&gt;
                      &lt;input type="password" id="password" class="form-control" name="password" required placeholder  ="Enter your Password"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="form-group"&gt;
                      &lt;label for="password" class="col-sm-3 control-label"&gt;Confirm Password&lt;/label&gt;
                      &lt;div class="col-sm-7"&gt;
                      &lt;input type="password" id="password2" class="form-control" name="cpassword" data-validate-linked="password" required placeholder  ="Re-enter your Password"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="modal-footer"&gt;
                      &lt;button type="submit" class="btn btn-primary"&gt;Register&lt;/button&gt;
                      &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Cancel&lt;/button&gt;
                      &lt;button type="reset" class="btn btn-default"&gt;Reset&lt;/button&gt;
                  &lt;/div&gt;
                  &lt;/form&gt;
  
                      &lt;!--End of registration form--&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  
  
  <p><strong>I dont know how to include the php in this form as it disappears</strong>
  Also if you could include links for further reading on php I would really appreciate.</p>