my Form
    <form role="form" method="post">
              <div class="form-group">
                <label for="email">Email address:</label>
                <input type="text" class="form-control" id="email" name="email">
              </div>
              <div class="form-group">
                <label for="pwd">Password:</label>
                <input type="text" class="form-control" id="pwd">
              </div>

              <button type="button" class="btn btn-default" data-toggle="modal" data-target="#myModal" name="submit">Submit</button>
            </form>
my Modal
<!-- Modal -->
<div id="myModal" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Modal Header</h4>
      </div>
      <div class="modal-body">
        <p>Some text in the modal.</p>
            <?php 

               === i want to retreive the value of textboxes in my form ====
            ?>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div>

  </div>
</div>

Uhm, not PHP, but JavaScript.

Create a function. That will get triggered each time someone pressed "Submit".
Retrieve the content of input field.
Write the content of the variable in wished place.

If you feelin' like stuck. You know where to find me ;)

Other side, using PHP, involves either reloading the entire website, or using AJAX response... but even then, it's still JavaScript or jQuery (it's library).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.