-
Notifications
You must be signed in to change notification settings - Fork 0
/
help_confirm.php
56 lines (43 loc) · 1.66 KB
/
help_confirm.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
// チェックとポストに必須な要素
function Check_and_Post(){
$return = '<a href="'.$_SERVER['HTTP_REFERER'].'">前に戻る</a>';
if (!(isset($_POST['phone']) && preg_match('/([0-9]{3})-([0-9]{4})-([0-9]{4})/',$_POST['phone']))) {
echo $_POST['phone']."は日本では使われていない電話番号です。<br>登録し直してください<br>";
echo $return;
}elseif(!($_POST['mail'] == $_POST['mailcheck']&&strpos($_POST['mail'],"@")>0)){
echo $_POST['mail']."は間違ったメールアドレスです<br>";
echo $return;
exit();
}else {
echo "チェック完了";
return array(
"お名前" => $_POST['firstname'].$_POST['lastname'],
"ふりがな" => $_POST['firstname2'].$_POST['lastname2'],
"性別" => $_POST['sex'],
"生年月日" => $_POST['date'],
"連絡可能なメールアドレス" => $_POST['mail'],
"連絡可能な電話番号" => $_POST['phone'],
"最終学歴" => $_POST['college'],
"学科" => $_POST['subject'],
"特技" => $_POST['hobby']
);
}
}
// セッションに必須な要素
function mk_session(){
$_SESSION['firstname']=$_POST['firstname'];
$_SESSION['lastname']=$_POST['lastname'];
$_SESSION['firstname2']=$_POST['firstname2'];
$_SESSION['lastname2']=$_POST['lastname2'];
$_SESSION['name1']=$_POST['firstname'].$_POST['lastname'];
$_SESSION['name2']= $_POST['firstname2'].$_POST['lastname2'];
$_SESSION['sex']=$_POST['sex'];
$_SESSION['birth']=$_POST['date'];
$_SESSION['mail']=$_POST['mail'];
$_SESSION['phone']=$_POST['phone'];
$_SESSION['college']=$_POST['college'];
$_SESSION['subject']=$_POST['subject'];
$_SESSION['hobby']=$_POST['hobby'];
}
?>