从表中发布php中的数组
有这个html页面,我在其中输入一些字段,并在php中发布所有值。以下是我的html代码:从表中发布php中的数组,php,html,arrays,post,Php,Html,Arrays,Post,有这个html页面,我在其中输入一些字段,并在php中发布所有值。以下是我的html代码: <form action = 'preViewTallyHdr.php' method = 'POST' target="_blank"> <p>Supplier Name & contact person: <input class = 'supplier' type = 'text' id = 'supplierInp
<form action = 'preViewTallyHdr.php' method = 'POST' target="_blank">
<p>Supplier Name & contact person:
<input class = 'supplier' type = 'text' id = 'supplierInput' value = '' STYLE="color: blue"; size="47" name = "supplier">
</p>
<p>Wood specie description:
<input class = 'woodSpe' type = 'text' id = 'woodSpecie' value = ''STYLE="color: blue"; size = "55" name = "wood">
</p>
<!--this is for viewing newly added planks (jqgrid)-->
<table id="plankList" name="plankList[]"></table>
<div id="pgrid"></div>
<!--this button will open another dialog (dialogAdd) for adding new plank-->
<input type ='button' id="btnAddnew" value = 'Add Plank'>
<input type = "Submit" value="Preview">
</form>
<div id="dialogAdd" title="Plank Entry">
<form method="post" action="#" id="plank_form">
<p>Plank number :
<input type="text" class="integer" name="plank_number" id="plank_number"/></p>
<p>Thickness:
<input type="text" class="numeric" name="thickness" id="thickness"/></p>
<p>Width:
<input type="text" class="numeric" name="width" id="width"/></p>
<p>Length:
<input type="text" class="numeric" name="length_t" id="length_t"/></p>
<p>Quantity:
<input type="text" class="integer" name="quantity" id="quantity"/></p>
</form>
</div>
并将继续取决于用户输入的板数
我已经有一个.php文件可以输出我的供应商和木材品种,但我不知道如何在那里显示我的post表数据。下面是我用php编写的代码(没有显示表格的代码)
供应商名称和联系人:
木材种类说明:
你可以在ajax请求(jquery)中发布它。我也尝试过,但我不知道如何调用我的planklist
数组并将其放入网格。你检查过jqgrid的API文档吗?[
[{"plank_number":"1","thickness":"5","width":"7","length_t":"8","quantity":"1"},
{"plank_number":"2","thickness":"5","width":"6","length_t":"7","quantity":"1"},
{"plank_number":"3","thickness":"6","width":"7","length_t":"8","quantity":"1"}]
<p>Supplier Name & contact person:<?php echo $_POST['supplier'];?><br/>
</p>
<p>Wood specie description:<?php echo $_POST['wood'];?>
</p>
<?php
//this is for my table which i don't know how to start
?>
<table id="plankList" name="plankList[]"></table>
[{"plank_number":"1","thickness":"5","width":"7","length_t":"8","quantity":"1"},
{"plank_number":"2","thickness":"5","width":"6","length_t":"7","quantity":"1"},
{"plank_number":"3","thickness":"6","width":"7","length_t":"8","quantity":"1"}]