"; global $wpdb; // Check if form has been submitted if (isset($_POST['submit'])) { // Get email addresses and expiration from input area $email_list = $_POST['email_list']; // Replace with the name of your input field $emails = explode("\n", $email_list); // Split input into an array of email addresses //echo "
";print_r( $emails ); echo ""; $delimiter = "/[\s\t]+/"; // Regular expression to match one or more spaces or tabs // Checking data $clean_data = array(); // The array holds clean or sanitized data. $error_data = array(); // The array holds error data. $pattern = "/^\d{4}-\d{2}-\d{2}$/"; foreach ($emails as $email) { $ary_email_expiration = preg_split($delimiter, $email); [$email,$expiration,$event] = array_slice($ary_email_expiration, 0 ,3); //echo $email ." " .$expiration ."
";print_r( $clean_data ); echo ""; //echo "error_data:
";print_r( $error_data ); echo ""; //if error_data not empty then die; if(count($error_data)>0){ echo "資料有誤,請檢查後重新匯入( 返回上一頁 )
所有 Email 皆已處理完
'; echo ' 返回上一頁 '; die(); } ?>";print_r($resultes) ;echo "999"; if ($results) { foreach ($results as $row) { //取得 hash_email $hash_email_list[$row->email][2] = $row->expiration; $hash_email_list[$row->email][3] = $row->replay_conf2023; //$hash_email_list[$row->email][4] = $row->replay_summer; } } //echo "
";print_r($hash_email_list);echo ""; } ?>
| hash_Email | 到期日 | conf2023 | |
|---|---|---|---|