|
|
@ -34,7 +34,7 @@ getdata();
|
|
|
|
//write
|
|
|
|
//write
|
|
|
|
|
|
|
|
|
|
|
|
async function writeData(post_number){
|
|
|
|
async function writeData(post_number){
|
|
|
|
var url = 'write.php?post='+ post_number;
|
|
|
|
var url = '../write.php?post='+ post_number;
|
|
|
|
let response = await fetch(url);
|
|
|
|
let response = await fetch(url);
|
|
|
|
console.log(response);
|
|
|
|
console.log(response);
|
|
|
|
console.log(response.text());
|
|
|
|
console.log(response.text());
|
|
|
@ -62,7 +62,7 @@ async function writePost(){
|
|
|
|
var post = document.getElementById('username2').value;
|
|
|
|
var post = document.getElementById('username2').value;
|
|
|
|
var name = document.getElementById('user-message2').value;
|
|
|
|
var name = document.getElementById('user-message2').value;
|
|
|
|
console.log(post,name);
|
|
|
|
console.log(post,name);
|
|
|
|
var url = 'writepost.php?post='+ post + '&name=' + name;
|
|
|
|
var url = '../writepost.php?post='+ post + '&name=' + name;
|
|
|
|
let response = await fetch(url);
|
|
|
|
let response = await fetch(url);
|
|
|
|
console.log(response);
|
|
|
|
console.log(response);
|
|
|
|
console.log(response.text());
|
|
|
|
console.log(response.text());
|
|
|
|