teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

文法の修正

2019/10/15 10:10

投稿

MM1908000
MM1908000

スコア10

title CHANGED
File without changes
body CHANGED
@@ -36,17 +36,23 @@
36
36
  $_SESSION = $_POST;
37
37
 
38
38
  $postData = $_POST;
39
+ $page_flag = 0;
39
40
  $error = array();
40
41
  function formValidation($postData) {
41
42
 
42
- $error = array();
43
- if(empty($postData['check01'])){
43
+ if(empty($postData['check01'])){
44
44
  $error[] = "none";
45
45
  }
46
+
46
47
  return $error;
47
48
  }
48
49
  $error = formValidation($postData);
49
-
50
+ if(!empty($error)) {
51
+ $page_flag = 1;
52
+ } else {
53
+ $page_flag = 0;
54
+ }
55
+
50
56
  ?>
51
57
  <!doctype html>
52
58
  <html>