Skip to content

sbatin.com #1658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
msbatin1 opened this issue Apr 10, 2025 · 1 comment
Open

sbatin.com #1658

msbatin1 opened this issue Apr 10, 2025 · 1 comment

Comments

@msbatin1
Copy link

setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // الحصول على عنوان IP الخاص بالزائر $ip_address = $_SERVER['REMOTE_ADDR']; // الحصول على عنوان URL للصفحة الحالية $page_url = $_SERVER['REQUEST_URI']; // إعداد استعلام SQL لإدخال البيانات $stmt = $conn->prepare("INSERT INTO page_visits (ip_address, page_url) VALUES (:ip, :url)"); $stmt->bindParam(':ip', $ip_address); $stmt->bindParam(':url', $page_url); // تنفيذ الاستعلام $stmt->execute(); } catch(PDOException $e) { // يمكنك تسجيل الخطأ هنا بدلاً من عرضه للمستخدم في بيئة الإنتاج error_log("Database Error: " . $e->getMessage()); } $conn = null; // إغلاق الاتصال بقاعدة البيانات ?>

mysql.example.com

@svantevonerichsen6906
Copy link
Collaborator

読めないよ。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants