반응형
if(!empty($_POST['mode'])){
foreach($_POST as $k=>$v){
switch($k){
case 'email': ${$k} = implode('@', $v); break;
case 'tel' : break;
case 'cel' : ${$k} = implode('-',$v); break;
case 'post_cd1' : continue; break;
case 'post_cd2' : $post_cd = $_POST['post_cd1'].'-'.$_POST['post_cd2']; break;
default : ${$k} = $v; break;
}
}
}
반응형
댓글