Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Formular in texdatei speichern

Empfohlene Antworten

Veröffentlicht

Hallo,

ich bin ein Anfänger in php und in HTML bin ich schon etwas fortgeschrittener.

Ich habe ein HTML Formular geschrieben welches die Daten an eine php datei übergibt und das php script verschickt dann eine Mail.

Das funktioniert mittlerweile auch ganz gut, nur möchte ich jetzt noch ganz gerne, dass die Daten aus dem Formular zusätzlich in einer Textdatei gespeichert werden, also Quasi als Kopie von der abgeschickten Mail.

Ich bin mir noch nicht sicher ob alle mails in eine Datei untereinander geschrieben werden sollen oder für jede Mail eine neue Texdatei angelegt werden soll. :rolleyes:

Könnt ihr mir helfen wie ich das realiseren kann? :confused:

MfG

nur ein Beispiel, welches per POST übertragene Variablen in eine textdatei schreibt


<?php

$fp = fopen($file,"a");


if ($fp) {

  while (list($k,$v) = each($HTTP_POST_VARS)) {

    $string = $k." = ".$v;

    fputs($fp,$string);

  } fclose($fp);

}

?>

ich würde empfehlen das ganze in eine XML datei zu schreiben

(bzw. pro mail eine, kommt drauf an wieviel daten eine Mail enthält..)

So kannst du die daten später sehr einfach weiterverarbeiten...

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.