note 130201 added to language.basic-syntax

From: Date: Fri, 28 Mar 2025 09:35:06 +0000
Subject: note 130201 added to language.basic-syntax
Groups: php.notes 
Request: Send a blank email to php-notes+get-222035@lists.php.net to get a copy of this message
// GET Parameter auslesen $id = $_GET['id']; // prepared Statement bei Usereingabe! (Vermeidung von SQL-Injections) $stmt = $conn->prepare("SELECT * FROM products WHERE productCode = :id"); // Statement mit Platzhalter $stmt->bindParam(':id', $id); // Platzhalter mit Wert befüllen $stmt->execute(); // Query ausführen // alle Daten mit 'fetch' fetchen -> Ergebnis ist ein 1-dimensionales Array mit einem Datensatz $result = $stmt->fetch(PDO::FETCH_ASSOC); ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.5.137 (proxied: 193.170.70.27) ---- Manual Page -- https://php.net/manual/en/language.basic-syntax.php Edit -- https://main.php.net/note/edit/130201 Del: integrated -- https://main.php.net/note/delete/130201/integrated Del: useless -- https://main.php.net/note/delete/130201/useless Del: bad code -- https://main.php.net/note/delete/130201/bad+code Del: spam -- https://main.php.net/note/delete/130201/spam Del: non-english -- https://main.php.net/note/delete/130201/non-english Del: in docs -- https://main.php.net/note/delete/130201/in+docs Del: other reasons-- https://main.php.net/note/delete/130201 Reject -- https://main.php.net/note/reject/130201 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#222035) next »