I have an ecommerce site based off of this tutorial.
Now, in the cart.php page, whenever someone updates the quantity and proceeds to click the Update Cart
button, they are greeted with the following notices:
Notice: Array to string conversion in /home/aquadual/public_html/fiverrproject/plaincart/library/config.php on line 51
Notice: Array to string conversion in /home/aquadual/public_html/fiverrproject/plaincart/library/config.php on line 51
Notice: Array to string conversion in /home/aquadual/public_html/fiverrproject/plaincart/library/config.php on line 51
Unknown column 'A' in 'where clause'
Here is the code in the config.php
file affecting this notice:
if (!get_magic_quotes_gpc()) {
if (isset($_POST)) {
foreach ($_POST as $key => $value) {
**$_POST[$key] = trim(addslashes($value));**
}
}
if (isset($_GET)) {
foreach ($_GET as $key => $value) {
$_GET[$key] = trim(addslashes($value));
}
}
}
The actual line being line 51 in the whole config file:
$_POST[$key] = trim(addslashes($value));