Php code, Database Connections with Mysql, Java Script , Jquery, Codeigniter
$string = 'name @123&';
echo preg_replace('/[^A-Za-z0-9\-]/', '', $string)