Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在输入字段中附加 id 并在 PHP 中的其他页面上发送?
<input type="text" size="3" name="new_quantity[]" value="<?php echo $product_quantity; ?>" />
有什么帮助吗??
尝试这个 :
<input type="text" size="3" name="new_quantity[<?php echo $product_id; ?>]" value="<?php echo $product_quantity; ?>" />
改变:name="new_quantity[<?php echo $product_id; ?>]"
name="new_quantity[<?php echo $product_id; ?>]"
在另一页
print_r($_REQUEST['new_quantity']);
您可以将product_id其视为输入字段的键和value值。
product_id
value