title: How to passing data to modal Materializecss
body: <p>My website uses the Materialize CSS for CSS framework and PHP for the back-end language. But, I have some problem. I want to make edit data features on modal, but I don't know how to passing data to the modal. What should I do?</p>
  <p><strong>This is my modal content code:</strong></p>
  <pre><code>&lt;!-- Modal Start (Edit Kamar) --&gt;
  &lt;div id=&quot;edit-kamar&quot; class=&quot;modal z-depth-0&quot;&gt;
     &lt;div class=&quot;modal-content white&quot;&gt;
        &lt;h5 class=&quot;grey-text text-darken-2&quot;&gt;&lt;b&gt;Perbarui Data&lt;/b&gt;&lt;/h5&gt;
        &lt;form class=&quot;row&quot;&gt;
           &lt;div class=&quot;col s12&quot;&gt;
              &lt;div class=&quot;row&quot;&gt;
                 &lt;div class=&quot;input-field col s12&quot;&gt;
                    &lt;input id=&quot;nomor&quot; type=&quot;text&quot; name=&quot;no_kamar&quot; class=&quot;validate&quot;&gt;
                    &lt;label for=&quot;nomor&quot;&gt;Nomor Kamar&lt;/label&gt;
                 &lt;/div&gt;
              &lt;/div&gt;
              &lt;!--  --&gt;
              &lt;div class=&quot;row&quot;&gt;
                 &lt;div class=&quot;input-field col s12&quot;&gt;
                    &lt;input id=&quot;deskripsi&quot; type=&quot;text&quot; name=&quot;fasilitas&quot; class=&quot;validate&quot;&gt;
                    &lt;label for=&quot;deskripsi&quot;&gt;Fasilitas&lt;/label&gt;
                 &lt;/div&gt;
              &lt;/div&gt;
              &lt;button class=&quot;btn waves-effect waves-light blue&quot; type=&quot;submit&quot; name=&quot;edit_kamar&quot;&gt;edit
                 &lt;i class=&quot;material-icons right&quot;&gt;add&lt;/i&gt;
              &lt;/button&gt;
           &lt;/div&gt;
        &lt;/form&gt;
     &lt;/div&gt;
     &lt;div class=&quot;modal-footer&quot;&gt;
        &lt;a class=&quot;modal-close waves-effect waves-light btn-small grey&quot;&gt;batal&lt;/a&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  
  </code></pre>