'; // print_r($_POST); // die("JJJ"); $temp_xyz_ihs_title = str_replace(' ', '', $_POST['snippetTitle']); $temp_xyz_ihs_title = str_replace('-', '', $temp_xyz_ihs_title); $xyz_ihs_title = str_replace(' ', '-', $_POST['snippetTitle']); $xyz_ihs_content = $_POST['snippetContent']; if($xyz_ihs_title != "" && $xyz_ihs_content != ""){ if(ctype_alnum($temp_xyz_ihs_title)) { $snippet_count = $wpdb->query($wpdb->prepare( 'SELECT * FROM '.$wpdb->prefix.'xyz_ihs_short_code WHERE title=%s' ,$xyz_ihs_title)) ; if($snippet_count == 0){ $xyz_shortCode = '[xyz-ihs snippet="'.$xyz_ihs_title.'"]'; $wpdb->insert($wpdb->prefix.'xyz_ihs_short_code', array('title' =>$xyz_ihs_title,'content'=>$xyz_ihs_content,'short_code'=>$xyz_shortCode,'status'=>'1'),array('%s','%s','%s','%d')); header("Location:".admin_url('admin.php?page=insert-html-snippet-manage&xyz_ihs_msg=1')); }else{ ?>