CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 06:52:05 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=ba7eb91acb31e0dd25a86e0061aaa0e2ce654dc140567200ba59a0f1ede0da23a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22kKKY3U1gzevIdBvYq_5hN96gINW1nQkt%22%3B%7D; HttpOnly; Path=/
cf-ray: 98cc6ec45e777679-BLR
fgd - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- erstelle mir ein Kleines Script in dem ich meine Kleinteile der WErkstatt eintragen kann ähnlich wie ein Warenwirtschafts system nur sehr Simple bitte
- Gerne! Hier ist ein einfaches Skript, mit dem du deine Kleinteile in einer Textdatei speichern und später anzeigen kannst:
- index.php:
- php
- Copy code
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Kleinteileverwaltung</title>
- </head>
- <body>
- <h1>Kleinteileverwaltung</h1>
- <form method="post" action="add_item.php">
- <label>
- Artikelname:
- <input type="text" name="name">
- </label>
- <br>
- <label>
- Anzahl:
- <input type="number" name="anzahl" min="1">
- </label>
- <br>
- <input type="submit" value="Hinzufügen">
- </form>
- <hr>
- <h2>Aktuelle Bestände</h2>
- <?php include "list_items.php"; ?>
- </body>
- </html>
- add_item.php:
- php
- Copy code
- <?php
- if ($_SERVER["REQUEST_METHOD"] == "POST") {
- $name = $_POST["name"];
- $anzahl = $_POST["anzahl"];
- if ($name && $anzahl) {
- $filename = "items.txt";
- $file = fopen($filename, "a");
- fwrite($file, "$name:$anzahl\n");
- fclose($file);
- }
- }
- header("Location: index.php");
- list_items.php:
- php
- Copy code
- <?php
- $filename = "items.txt";
- if (file_exists($filename)) {
- $file = fopen($filename, "r");
- echo "<ul>";
- while (!feof($file)) {
- $line = fgets($file);
- if ($line != "") {
- list($name, $anzahl) = explode(":", $line);
- echo "<li>$name: $anzahl</li>";
- }
- }
- echo "</ul>";
- fclose($file);
- } else {
- echo "<p>Es sind noch keine Artikel eingetragen.</p>";
- }
- ?>
- Das Skript besteht aus drei Dateien:
- index.php: Die Hauptseite, auf der Artikel hinzugefügt und die aktuellen Bestände angezeigt werden können.
- add_item.php: Eine Seite, auf der ein neuer Artikel zur Textdatei "items.txt" hinzugefügt wird.
- list_items.php: Eine Datei, die eine Liste aller Artikel in der Textdatei "items.txt" generiert.
- Wenn du das Skript ausprobieren möchtest, musst du eine Datei namens "items.txt" im selben Verzeichnis wie die drei Dateien erstellen.
Advertisement
Add Comment
Please, Sign In to add comment
-
✅ Make $2500 in 20 minutes⭐⭐⭐ H
JavaScript | 1 sec ago | 0.24 KB
-
⭐✅ MAKE $2000 INSTANTLY ✅ NEVER SEEN BEFORE ⭐...
JavaScript | 9 sec ago | 0.24 KB
-
⭐⭐⭐Crypto Accounts⭐⭐
Java | 12 sec ago | 0.10 KB
-
⭐⭐Exchange Exploit⭐⭐ M
JavaScript | 12 sec ago | 0.24 KB
-
⭐ Free Crypto Method ✅ NEVER SEEN BEFORE ⭐⭐⭐
JavaScript | 18 sec ago | 0.24 KB
-
⭐⭐⭐MAKE $900 INSTANTLY⭐⭐
Java | 23 sec ago | 0.10 KB
-
✅⭐ Make huge profits on trading ⭐⭐ 4
JavaScript | 23 sec ago | 0.24 KB
-
✅⭐ Make huge profits on trading ✅ NEVER SEEN...
JavaScript | 27 sec ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand