add cadastro

This commit is contained in:
Ronaldo
2026-04-06 12:36:25 +00:00
parent a315eab0d5
commit e61ccda3ed
787 changed files with 155807 additions and 0 deletions

26
lista/ativar.php Executable file
View File

@@ -0,0 +1,26 @@
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "xcmg";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Conexão falhou: " . $conn->connect_error);
}
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["id"])) {
$id = intval($_POST["id"]);
$sql = "UPDATE cadastros SET status = 1 WHERE id = $id";
if ($conn->query($sql) === TRUE) {
echo "success";
} else {
echo "error";
}
}
$conn->close();