I want to insert password to the database existing field.but this shows an error..
<?php
include './DB_Connection/connection.php';
//some code
$sql = mysql_query("UPDATE user_info SET password = '$password' WHERE company_name='$company_name' AND email = '$email' ");
$result = $db->query($sql);
echo 'out';
if ($result) {//some cose
}
?>
Fatal error: Call to a member function query() on a non-object in "path"\password_generation.php on line 23
line 23 is : $result = $db->query($sql);