Skip to content
Snippets Groups Projects
Commit 15c99a4e authored by Jonas Leder's avatar Jonas Leder
Browse files

move new comment in API dor

parent 9ff9fc11
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ class newComment extends HTMLElement { ...@@ -8,7 +8,7 @@ class newComment extends HTMLElement {
let sitekey = await (await fetch("/API/config.php?name=sitekey")).text(); let sitekey = await (await fetch("/API/config.php?name=sitekey")).text();
this.innerHTML = ` this.innerHTML = `
<form action="/newComment.php" method="post"> <form action="/API/newComment.php" method="post">
<label for="name">Name:</label><br> <label for="name">Name:</label><br>
<input type="text" id="name" name="name"><br><br> <input type="text" id="name" name="name"><br><br>
......
<?php <?php
include("./internal/mysql.php"); include("./lib/config.php");
include("./lib/mysql.php");
$data = array( $data = array(
'secret' => $secretkey, 'secret' => $secretkey,
......
<?php <?php
include "internal/header.php"; include "internal/header.php";
include "internal/footer.php"; include "internal/footer.php";
include "internal/mysql.php";
getHeader("Jonas Leder", "home"); getHeader("Jonas Leder", "home");
?> ?>
......
<?php
include "config.php";
$conn = new mysqli($mysqlServer, $mysqlUser, $mysqlPassword, $mysqlDatabase);
// Check connection
if ($conn->connect_error) {
include "500.php";
header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);
die(getError500());
}
<?php <?php
include "internal/mysql.php";
include "internal/header.php"; include "internal/header.php";
include "internal/footer.php"; include "internal/footer.php";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment