crazylegseddie Posted March 20, 2007 Share Posted March 20, 2007 My site was currently running on a PHP 4.0 but server forced me to upgrade to 5.0 suit another site. Now when I go to update my shopping cart I receive the following msg: Notice: Array to string conversion in /var/www/virtual/whitedisc.com/library/config.php on line 51 Unknown column 'A' in 'where clause' and below is the following script snippet. if (!get_magic_quotes_gpc()) { if (isset($_POST)) { foreach ($_POST as $key => $value) { $_POST[$key] = trim(addslashes($value)); } } I created this site a long time ago and havent used PHP since so am really lost with this one? Can someone help me please. Thank You Link to comment https://forums.phpfreaks.com/topic/43570-annoying-notice/ Share on other sites More sharing options...
suzzane2020 Posted March 20, 2007 Share Posted March 20, 2007 is hth te line where u get te error? Link to comment https://forums.phpfreaks.com/topic/43570-annoying-notice/#findComment-211613 Share on other sites More sharing options...
crazylegseddie Posted March 20, 2007 Author Share Posted March 20, 2007 $_POST[$key] = trim(addslashes($value)); Link to comment https://forums.phpfreaks.com/topic/43570-annoying-notice/#findComment-211615 Share on other sites More sharing options...
per1os Posted March 20, 2007 Share Posted March 20, 2007 Addslashes EEEK!! If this is for mysql, use mysql_real_escape_string() instead! As for the error, that is part of a SQL statement, we need more code. Link to comment https://forums.phpfreaks.com/topic/43570-annoying-notice/#findComment-211616 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.