Account Activation
connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// التحقق من صحة كود التفعيل
$stmt = $conn->prepare("SELECT * FROM activation_codes WHERE activation_code=? AND hardware_id=?");
$stmt->bind_param("ss", $activation_code, $hardware_id);
$stmt->execute();
$result = $stmt->get_result();
if ($result->num_rows > 0) {
$stmt = $conn->prepare("UPDATE activation_codes SET is_active=1 WHERE activation_code=? AND hardware_id=?");
$stmt->bind_param("ss", $activation_code, $hardware_id);
$stmt->execute();
echo "Activation successful!";
} else {
echo "Invalid activation code or hardware ID.";
}
$conn->close();
}
?>