I have managed to create a php code that will link to MYSQL, so the user can add data, delete and edit. Howerver, I'm currently having an issue so if the user wishes to edit some data, it will reset the last 3 columns to 0's. If I edit a data during the last 3 columns, it will not be eddited and instead be replaced with 0's at the last 3 columns.
{
$eBranch=$_POST['eBranch'];
$eSales=$_POST['eSales'];
$eQuantity=$_POST['eQuantity'];
$eChargeNO=$_Post['eChargeNO'];
$eCreditNO=$_Post['eCreditNO'];
$eTotal=$_Post['eTotal'];
$updated=mysql_query("UPDATE report SET BranchID='$eBranch', Sales_Assistant_ID='$eSales', Quantity='$eQuantity' , Charge_Accounts='$eChargeNO', Credit_Accounts='$eCreditNO', Total='$eTotal' WHERE id='$id'")or die();
if($updated)
{
$msg="Successfully Updated!!";
header('Location:index.php');
}
}
}
Please ask me if you need more information! I'm not sure if this is enough