The error message you are encountering is a "Warning: A non-numeric value encountered." This warning indicates that you are trying to perform a mathematical operation involving a non-numeric value. In your case, the issue seems to be with the variable $total_price or $quantities being non-numeric.
To resolve this error, you can follow these steps:
Ensure that the $total_price variable is properly initialized and assigned a numeric value before the line where the error occurs. Verify that you have code that sets the initial value for $total_price correctly.
Check the value of $quantities by adding a debug statement before the problematic line. For example, you can use var_dump($quantities); to print the value and its data type. Make sure it is a numeric value.
If $quantities is not a numeric value, you should investigate why it's not being assigned correctly. Check the form where the quantity is submitted ($_POST['qty']) and ensure that the input field is correctly defined with the name attribute set to "qty". Additionally, make sure that only numeric values are being entered into that input field.
If you find that $quantities is indeed a non-numeric value, you can add input validation to ensure that only valid numeric values are submitted. You can use PHP functions like is_numeric() or filter_var() to validate the input and handle any non-numeric cases accordingly.
By following these steps, you should be able to identify and fix the issue causing the warning.
For remote jobs as a PHP developer you can visit our site Avogtal