Hi,
Good day!
Before i have codes like this:
//query select compound_type
$sql_comp = "SELECT cloth_id, cloth_type FROM assembly_cloth_list WHERE process_cloth_id = '3' ORDER BY cloth_type ASC";
$res = mysql_query($sql_comp);
if(mysql_num_rows($res)){
$display .= "<table border=0 cellpadding=1 cellspacing=3 class=\\"display\\">\\r";
while($comp = mysql_fetch_assoc($res)){
$cloth_type = $comp['cloth_type'];
$cloth_id = $comp['cloth_id'];
$display .= "<tr>";
//---display cloth_type
$display .= "<td style=\\"width:230px;\\" align=\\"center\\">
<input type='text' name='cloth_type[]' value='$cloth_type' style='border:none;' size='33' />
<input type='hidden' name='cloth_id[]' value='$cloth_id' />
</td>";
//---input box for output
$display .= "<td style=\\"width:66px;\\" align=\\"center\\"><input type='text' name='output[]' value='' style=\\"width:96%;\\" /></td>";
//----i used foreach to loop textbox in every reject acronym.
foreach($reject_id AS $reject_i) {
$display .= "<td style=\\"width:66px;\\" align=\\"center\\"><input type='text' name='reject[$cloth_id][]' value='' style=\\"width:96%;\\" /></td>";
}
$display .= "</tr>";
}
now I need to change it for new module. Now the Cloth was not display. it will be also type by the user.
now I have a problem on reject
how can I change this line of code:
foreach($reject_id AS $reject_i) {
$display .= "<td style=\\"width:66px;\\" align=\\"center\\"><input type='text' name='reject[$cloth_id][]' value='' style=\\"width:96%;\\" /></td>";
}
how can I change this code: name=‘reject[$cloth_id]’
if I don’t have $cloth_id and the cloth_type is like this
$display .= "<td style=\\"width:190px;\\" align=\\"center\\">
<input type='text' name='cloth_type[]' value='' size='27' />
</td>";
Thank you