title: How to fetch column values from database onto a Pop-up form for only those projects selected by user?
body: <p>I am using <code>MySQL Database</code> under which I have a table named <strong><code>sponsors</code></strong> having following columns.</p>
  
  <pre><code>id | project_id | project_name | sector | duration | budget | location  
  </code></pre>
  
  <p>Now, I have created a page in <code>php</code> on which a user can select multiple projects at a time by clicking on the checkbox as you can see in the image below :</p>
  
  <p><a href="https://i.stack.imgur.com/XJxOq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XJxOq.png" alt="Multiple projects selection page"></a></p>
  
  <p>After selecting the projects, when user clicks on submit, a pop-up form will appear like this :</p>
  
  <p><a href="https://i.stack.imgur.com/3OgGy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3OgGy.png" alt="Pop-up form"></a></p>
  
  <p>On which there should be the comma separated values of <code>project_id</code> (from the Database) of all the selected projects by user.</p>
  
  <p>So far I've done this much coding :</p>
  
  <pre><code> &lt;!-- //CheckBOX --&gt;
   &lt;td&gt; &lt;input type="checkbox" name="check_id[]"
                              value="&lt;?php $row["project_id"];?&gt;"&gt; &lt;/td&gt;
   &lt;td&gt; &lt;?php echo $data["project_id"]; ?&gt;   &lt;/td&gt;
   &lt;td&gt; &lt;?php echo $data["project_name"]; ?&gt; &lt;/td&gt;
  </code></pre>
  
  <p><a href="https://www.paste.org/92566" rel="nofollow noreferrer">See this</a> to have a view of full code.</p>
  
  <p>So, my question is <strong>How to fetch column values from database onto a Pop-up form for only those projects that have been checkbox selected by user</strong> ?</p>
  
  <p>How can I achieve that. I am open to accept any sensible solution in any language, but would prefer to have it in JavaScript or php .</p>