synonim pages and new dump
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
include('../include/headscript.php');
|
||||
include("../class/company.php");
|
||||
$conn = new mysqli($servername, $username, $password, $database);
|
||||
if (isset($_POST['refid'], $_POST['name'])) {
|
||||
$refid = $_POST['refid'];
|
||||
$name = $_POST['name'];
|
||||
$preferred = 'N';
|
||||
|
||||
$stmt = $conn->prepare("INSERT INTO compundsvocabulary (namecompoundsvocabulary, refid, preferred) VALUES (?, ?, ?)");
|
||||
$stmt->bind_param('sis', $name, $refid, $preferred);
|
||||
|
||||
if ($stmt->execute()) {
|
||||
echo json_encode(['success' => true]);
|
||||
} else {
|
||||
echo json_encode(['success' => false, 'error' => $stmt->error]);
|
||||
}
|
||||
} else {
|
||||
echo json_encode(['success' => false, 'error' => 'Invalid input']);
|
||||
}
|
||||
Reference in New Issue
Block a user