Forum Replies Created

Viewing 1 replies (of 1 total)
  • Forum: Plugins
    In reply to: [Mail Subscribe List] Bug

    Use:

    if ($_POST['sml_subscribe']) {
    	$name = $_POST['sml_name'];
    	$email = $_POST['sml_email'];
    	if (is_email($email)) {
    
    		$count = $wpdb->get_var("SELECT COUNT(*) FROM ".$wpdb->prefix."sml where sml_email like '".$wpdb->escape($email)."' limit 1");
    		if ($count <1) {
    			$wpdb->query("insert into ".$wpdb->prefix."sml (sml_name, sml_email) values ('".$wpdb->escape($name)."', '".$wpdb->escape($email)."')");
    		}
    	}
    }
Viewing 1 replies (of 1 total)