質問編集履歴

2

再修正

2018/05/29 07:10

投稿

YasuoHayami
YasuoHayami

スコア6

test CHANGED
File without changes
test CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  ### 発生している問題・エラーメッセージ
16
16
 
17
- syntax error near unexpected token N in JASON at position
17
+ syntax error near unexpected token N in JSON at position
18
18
 
19
19
 
20
20
 

1

誤字等修正いたしました

2018/05/29 07:10

投稿

YasuoHayami
YasuoHayami

スコア6

test CHANGED
File without changes
test CHANGED
@@ -38,9 +38,9 @@
38
38
 
39
39
  var param = {
40
40
 
41
- "userId": "" + $("#userId").val()
41
+ "userId": "" + $("#userId").val(),
42
42
 
43
- , "password":"" + $("#password").val()
43
+ "password":"" + $("#password").val()
44
44
 
45
45
  };
46
46
 
@@ -48,17 +48,17 @@
48
48
 
49
49
  $.ajax({
50
50
 
51
-  type: "POST"
51
+ type: "POST",
52
52
 
53
-  , url: "./php/ctrl/loginCheck.php"
53
+ url: "./php/ctrl/loginCheck.php",
54
54
 
55
-  , async: false
55
+ async: false,
56
56
 
57
-  , dataType: "JSON"
57
+ dataType: "JSON",
58
58
 
59
-  , contentType: "application/json"
59
+ contentType: "application/json",
60
60
 
61
-  , data: {LOGIN_DATA: param}
61
+ data: {LOGIN_DATA: param}
62
62
 
63
63
  })
64
64
 
@@ -78,25 +78,21 @@
78
78
 
79
79
  window.location = "./?opt=<?php echo $opt ?>";
80
80
 
81
- })//Ajax通信処理成功
81
+ })
82
82
 
83
83
  .fail(function(XMLHttpRequest, textStatus, errorThrown){
84
84
 
85
85
  // デバッグ用
86
86
 
87
- console.log("ajax通信に失敗しました");
87
+ console.log("ajax通信に失敗しました");
88
88
 
89
- console.log("XMLHttpRequest.status : " + XMLHttpRequest.status);
89
+ console.log("XMLHttpRequest.status : " + XMLHttpRequest.status);
90
90
 
91
- console.log("textStatus : " + textStatus);
91
+ console.log("textStatus : " + textStatus);
92
92
 
93
- console.log("errorThrown : " + errorThrown.message); window.location = "./?opt=<?php echo $opt ?>";
93
+ console.log("errorThrown : " + errorThrown.message);
94
-
95
- // デバッグ用、ここまで
96
94
 
97
95
  })//Ajax通信Error処理
98
-
99
- });//Ajaxここまで
100
96
 
101
97
  ```
102
98
 
@@ -116,15 +112,15 @@
116
112
 
117
113
  if (isset($_POST["LOGIN_DATA"])) {
118
114
 
119
- $d = $_POST["LOGIN_DATA"];
115
+ $d = $_POST["LOGIN_DATA"];
120
116
 
121
- } else { 
117
+ } else { 
122
118
 
123
- var_dump($_POST["LOGIN_DATA"]);
119
+ var_dump($_POST["LOGIN_DATA"]);
124
120
 
125
- die("値が入力されていません");
121
+ die("値が入力されていません");
126
122
 
127
- exit;
123
+ exit;
128
124
 
129
125
  }
130
126
 
@@ -142,7 +138,7 @@
142
138
 
143
139
  Internal Server Error 500
144
140
 
145
- syntax error : unexpected end of JASON input
141
+ syntax error : unexpected end of JSON input
146
142
 
147
143
 
148
144
 
@@ -154,6 +150,6 @@
154
150
 
155
151
  Jquery 1.12.4
156
152
 
157
- HP 7.1
153
+ PHP 7.1
158
154
 
159
155
  Server Lolipop