Don't want to close modal after submitting data in modal PHP
P粉940538947
2023-09-04 14:35:19
<p>I want to keep the same pattern after submitting this form</p>
<p><code>generateBarcode.php</code>:</p>
<pre class="brush:php;toolbar:false;"><form action="savegenarateBarcode.php?id=<?php echo $d1; ?>" method="post"> ;</pre>
<p><code>savegenerateBarcode.php</code>:</p>
<pre class="brush:php;toolbar:false;"><?php
try {
session_start();
include('../connect.php');
$d1 = $_GET['id'];
$b = $_POST['serialnumber'];
$sqlm = "select *from product_item where serialnumber='".$b."'";
$query = $db->prepare($sqlm);
$user_array = $query ->execute();
}</pre>
<p>How can I keep <code>generateBarcode.php(modal)</code> unchanged after submitting this form? </p>
I think you should use
ajax
because the formsubmit
method reload the page.