I have a passed variable that should be loaded on a PHP-PDO query, but I get this error:
Fatal error: Call to a member function prepare() on a non-object in
Here is my code:
$color = $_GET['color'];
$items = $con -> prepare("SELECT * FROM item_descr WHERE color_base1 = :colorbase1");
$items = bindValue(':colorbase1', $color);
Any syggestions? thanks!