I want to use modal for add some customers to mySQL
I’m currently doing a mail automation web-app and I wanted to add modal for add some people who’s get the mails. should I use modal in php like
<code> echo "<tr onclick='selectRow(this)'>";
echo "<td><input type='checkbox' name='customers[]' value='". $row["CustomerID"]. "'></td>";
echo "<td>". $row["CustomerID"]. "</td>";
echo "<td>". $row["CustomerName"]. "</td>";
echo "<td>". $row["Email"]. "</td>";
echo "<td>". $row["ContactNumber"]. "</td>";
echo "<td>". $row["Address"]. "</td>";
echo "<td><button type='button' onclick='openModal(". $row["CustomerID"]. ")'>Göster</button></td>"; //! mutlaka düzenle
echo "<div class='modal'><div class='modal-content'><span class='close' onclick='closeModal()'>×</span><p>There is the customer details</p></div></div>"; //! needs fix
echo "</tr>";
</code>
<code> echo "<tr onclick='selectRow(this)'>";
echo "<td><input type='checkbox' name='customers[]' value='". $row["CustomerID"]. "'></td>";
echo "<td>". $row["CustomerID"]. "</td>";
echo "<td>". $row["CustomerName"]. "</td>";
echo "<td>". $row["Email"]. "</td>";
echo "<td>". $row["ContactNumber"]. "</td>";
echo "<td>". $row["Address"]. "</td>";
echo "<td><button type='button' onclick='openModal(". $row["CustomerID"]. ")'>Göster</button></td>"; //! mutlaka düzenle
echo "<div class='modal'><div class='modal-content'><span class='close' onclick='closeModal()'>×</span><p>There is the customer details</p></div></div>"; //! needs fix
echo "</tr>";
</code>
echo "<tr onclick='selectRow(this)'>";
echo "<td><input type='checkbox' name='customers[]' value='". $row["CustomerID"]. "'></td>";
echo "<td>". $row["CustomerID"]. "</td>";
echo "<td>". $row["CustomerName"]. "</td>";
echo "<td>". $row["Email"]. "</td>";
echo "<td>". $row["ContactNumber"]. "</td>";
echo "<td>". $row["Address"]. "</td>";
echo "<td><button type='button' onclick='openModal(". $row["CustomerID"]. ")'>Göster</button></td>"; //! mutlaka düzenle
echo "<div class='modal'><div class='modal-content'><span class='close' onclick='closeModal()'>×</span><p>There is the customer details</p></div></div>"; //! needs fix
echo "</tr>";
or use another html for this? and also I want to send infos of the customers to the mySQL database with ajax how can I use it?
New contributor
Muhammed Ali Polatkesen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.