質問編集履歴
3
再編集
test
CHANGED
File without changes
|
test
CHANGED
@@ -20,9 +20,9 @@
|
|
20
20
|
// myHeaders.append("Cookie", "PHPSESSID=itjgsbmsjf5sk87oh25rijhsn6");
|
21
21
|
|
22
22
|
const formdata = new FormData();
|
23
|
-
formdata.append("user_na
|
23
|
+
formdata.append("user_nane", "dummy");
|
24
|
-
formdata.append("compa
|
24
|
+
formdata.append("compay_code", "Z100");
|
25
|
-
formdata.append("employe
|
25
|
+
formdata.append("employe_code", "7878787888");
|
26
26
|
formdata.append("user_type", "0");
|
27
27
|
|
28
28
|
const requestOptions = {
|
@@ -32,7 +32,7 @@
|
|
32
32
|
redirect: "follow"
|
33
33
|
};
|
34
34
|
|
35
|
-
fetch("http://
|
35
|
+
fetch("http://*.*.*.*/conect.php", requestOptions)
|
36
36
|
.then((response) => response.text())
|
37
37
|
.then((result) => console.log(result))
|
38
38
|
.catch((error) => console.error(error));
|
@@ -52,12 +52,12 @@
|
|
52
52
|
$method = $_SERVER['REQUEST_METHOD'];
|
53
53
|
session_start();
|
54
54
|
if ($method == "POST") {
|
55
|
-
$_SESSION['us
|
55
|
+
$_SESSION['usr_name'] = $_POST['user_name'];
|
56
56
|
$_SESSION['company_code'] = $_POST['company_code'];
|
57
|
-
$_SESSION['employe
|
57
|
+
$_SESSION['employe_code'] = $_POST['employee_code'];
|
58
58
|
$_SESSION['user_type'] = $_POST['user_type'];
|
59
59
|
|
60
|
-
// header('Location: con
|
60
|
+
// header('Location: conect.php');
|
61
61
|
// exit;
|
62
62
|
}
|
63
63
|
|
2
タイトル編集
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
fetch(POST)で送った同時に次のページに遷移させたい
|
test
CHANGED
File without changes
|
1
補足追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -95,4 +95,5 @@
|
|
95
95
|
window.location.href = 'http://localhost/connect.php';
|
96
96
|
|
97
97
|
### 補足
|
98
|
+
まずは同ホストないですが
|
98
|
-
|
99
|
+
最終的には別ホストで実現したい
|