note 129557 added to reserved.variables.server
| From: | Anonymous | Date: | Fri, 07 Jun 2024 02:23:14 +0000 |
| Subject: | note 129557 added to reserved.variables.server | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-221360@lists.php.net to get a copy of this message | ||
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "name";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$customerid = $_POST['customerid']; // Retrieve customer ID from form submission
// SQL query to select customer information
$sql = "SELECT customerID, FIRSTNAME, LASTNAME, GENDER, CASH FROM CUSTOMER WHERE customerID =
'$customerid'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// Output data of each row
while($row = $result->fetch_assoc()) {
echo "customerID: " . $row["CustomerID"]. " - Name: " .
$row["FIRSTNAME"]. " " . $row["LASTNAME"]. " - Gender: " .
$row["GENDER"]. " - CASH: " . $row["CASH"]. "<br>";
}
} else {
echo "No customer found with customerID: $customerid";
}
$conn->close();
?>
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 1.145.122.183)
----
Manual Page -- https://php.net/manual/en/reserved.variables.server.php
Edit -- https://main.php.net/note/edit/129557
Del: integrated -- https://main.php.net/note/delete/129557/integrated
Del: useless -- https://main.php.net/note/delete/129557/useless
Del: bad code -- https://main.php.net/note/delete/129557/bad+code
Del: spam -- https://main.php.net/note/delete/129557/spam
Del: non-english -- https://main.php.net/note/delete/129557/non-english
Del: in docs -- https://main.php.net/note/delete/129557/in+docs
Del: other reasons-- https://main.php.net/note/delete/129557
Reject -- https://main.php.net/note/reject/129557
Search -- https://main.php.net/manage/user-notes.php