Custom meta box save values issues – Deprecated: Function ereg() and more

Try the following. Replace

ereg('/\edit\.php', $_SERVER['REQUEST_URI'])

with

preg_match('/edit.php/',  $_SERVER['REQUEST_URI'])

And also change

if(isset($_POST[$meta_box['name'].'_value'])){
    $data = $_POST[$meta_box['name'].'_value'];
}

to

if(isset($_POST[$meta_box['name'].'_value'])){
    $data = $_POST[$meta_box['name'].'_value'];
}
else
    $data = "";

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)