我有一个弹出窗体,当用户点击"更新"时,应该有一个弹出窗体,用户应该可以更新但弹出窗口不会出现,因为" a HREF"有回声"在id值。见下文:echo $ orderId
<a href="#id=<?php echo $orderId ?>" id="btn">Update</a>
但是,如果我删除<?php echo $orderId ?>
部分,例如<a href="#id" id="btn">Update</a>
,则弹出窗口有效,但回显错误ID。
以下是表格
<a href="#x" class="overlay" id="id=<?php echo $orderId; ?>"></a>
<div class="popup">
<form method = "post" action="">
<div>
<label for="Order ID">Order ID:</label><?php echo $orderId ?>
</div><br>
<div>
<label for="Order Date">Order Date:</label><?php echo $orderDate ?>
</div><br>
<div>
<label for="Order Total">Order Total:</label><?php echo $totalAmount ?>
</div><br>
<div>
<label for="Preparation Status">Preparation Status:</label>
<select name="preparationStatus"/>
<option value="<?php echo $preparationStatus; ?>">Default(<?php echo $preparationStatus; ?>)</option>
<option value="Pending">Pending</option>
<option value="Prepared">Prepared</option>
</select>
</div><br>
<div>
<label for="Payment Status">Payment Status:</label>
<select name="paymentStatus">
<option value="<?php echo $paymentStatus;?>">Default(<?php echo $paymentStatus;?>)</option>
<option value="Pending">Pending</option>
<option value="Paid">Paid</option>
</select>
</div><br>
<input type="submit" id="btn" name="submit" value="Save" />
<a class="close" href="#close"></a>
</form>
它只回显id="id=1"
如何显示弹出窗体?