here, are my full sourse code:
adm_branch_information.php
Code: Select all
$pingsql = "SELECT tbl_user.uid,
tbl_user.tbl_brnch_name,
tbl_brn_requst.id,
tbl_brn_requst.cat_id,
tbl_brn_requst.product_name,
tbl_brn_requst.product_desc,
tbl_brn_requst.rec_on,
tbl_brn_requst.return_on,
tbl_brn_requst.balancs,
tbl_brn_requst.sold,
tbl_brn_requst.re_qty,
tbl_brn_requst.dt_nwo,
tbl_brn_requst.commnt,
tbl_category.cat_id,
tbl_category.cat_name
FROM tbl_user INNER JOIN tbl_brn_requst ON tbl_user.uid = tbl_brn_requst.uid
INNER JOIN tbl_category ON tbl_brn_requst.cat_id = tbl_category.cat_id WHERE tempf <> '1988'";
$pingresult = mysql_query($pingsql);
?>
<div class = "main_adm_branch_tb"><table>
<form method = "POST" action = "return_information.php">
<th>Branch</th>
<th>Category</th>
<th>Item Name</th>
<th>Item Description</th>
<th>Remark</th>
<th>Return</th>
<th>Sold</th>
<th>Balance</th>
<th>Request</th>
<th>Date Request</th>
<th>User Log</th>
<th>UPDATE</th>
<?php
$count = mysql_num_rows($pingresult);
while($rows = mysql_fetch_array($pingresult))
{
?>
<?php $id[] = $rows['id'];?><input type = "hidden" name = "id" value = "<?php echo $rows['id']; ?>">
<input type = "hidden" name = "uid" value = "<?php echo $rows['uid']; ?>">
<input type = "hidden" name = "tempf[]" value = "1988" id = "tempf">
<input type = "hidden" name = "dt_response" value = "<?php echo date("F j, Y"); ?>">
<tr>
<td>
<input type = "text" name = "tbl_brnch_name" value = "<?php echo $rows['tbl_brnch_name']; ?>" style = "border:none; width:65px; height:15px;font-family:Tahoma, Geneva, sans-serif;font-size:11px;" readonly = "readonly"/></td>
<td><input type = "text" name = "cat_name" value = "<?php echo $rows['cat_name']; ?>" style = "border:none; width:80px; height:15px;font-family:Tahoma, Geneva, sans-serif;font-size:11px;" readonly = "readonly"/></td>
<td><input type = "text" name = "product_name" value = "<?php echo $rows['product_name']; ?>" style = "border:none; width:50px; height:15px;font-family:Tahoma, Geneva, sans-serif;font-size:11px;" readonly = "readonly"/></td>
<td><input type = "text" name = "product_desc" value = "<?php echo $rows['product_desc']; ?>" style = "border:none; width:160px; height:15px;font-family:Tahoma, Geneva, sans-serif;font-size:11px;" readonly = "readonly"/></td>
<td><input type = "text" name = "rec_on" value = "<?php echo $rows['rec_on']; ?>" style = "border:none; width:30px; height:15px;font-family:Tahoma, Geneva, sans-serif;font-size:11px;font-weight:bold;"></td>
<td><input type = "text" name = "return_on" value = "<?php echo $rows['return_on']; ?>" style = "border:none; width:30px; height:15px;font-family:Tahoma, Geneva, sans-serif;font-size:11px;" readonly = "readonly"></td>
<td><input type = "text" name = "sold" value = "<?php echo $rows['sold']; ?>" style = "border:none; width:30px; height:15px;font-family:Tahoma, Geneva, sans-serif;font-size:11px;" readonly = "readonly"></td>
<td><input type = "text" name = "balancs" value = "<?php echo $rows['balancs']; ?>" style = "border:none; width:30px; height:15px;font-family:Tahoma, Geneva, sans-serif;font-size:11px;" readonly = "readonly"></td>
<td><input type = "text" name = "re_qty" value = "<?php echo $rows['re_qty']; ?>" style = "border:none; width:30px; height:15px;font-family:Tahoma, Geneva, sans-serif;font-size:11px;" readonly = "readonly"></td>
<td><input type = "text" name = "dt_nwo" value = "<?php echo $rows['dt_nwo']; ?>" style = "border:none; width:80px; height:15px;font-family:Tahoma, Geneva, sans-serif;font-size:11px;" readonly = "readonly"></td>
<td><input type = "text" name = "commnt" value = "<?php echo $rows['commnt']; ?>" style = "border:none; width:70px; height:15px;font-family:Tahoma, Geneva, sans-serif;font-size:11px;" readonly = "readonly"></td>
<td><input type = "submit" name = "UPDATE" value = "UPDATE" style = "border:none;color:red; background:none; width:55px; height:15px;font-family:Tahoma, Geneva, sans-serif;font-size:11px;font-weight:bold;" ></td>
</tr>
<?php
}
?>
</form>
</table>
return_information.php
Code: Select all
$pingsqla = "UPDATE tbl_brn_requst SET tempf = '$tempf' WHERE id = '$id'";
$pingresulta = mysql_query($pingsqla) or die ("database error: $pingsqla" .mysql_error());
header('Location:adm_branch_information.php');
it is not updated, since i am currently gating more information. and only
tempf field that i want to edit from the list. and i hope you can give this a little time to understand and to help me. thnanks