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.

(html) textfeldinhalt an eine datenbank senden

Empfohlene Antworten

Veröffentlicht

hallo erstmal

was und wo muss im quelltext stehen wenn ich den inhalt eines textfeldes oder mehrerer in eine access datenbank senden will? In verbindung mit primery schlüssel.

Hallo,

Das hängt davon ab, mit welcher Sprache du arbeitest.

In HTML geht das gar nicht.

Also musst du erst einmal näher deine Entwicklungsumgebung beschreiben, oder dich über PHP, ASP, Perl oder Java informieren.

Gruß Jaraz

Ich schiebs mal zur Webserverprogrammierung rüber...

Du musst die Datenbank per ODBC als Datenquelle angeben.

Im HTML-Code sollte folgendes stehen:


<form action="beispiel.php" method="post">

  <textarea cols="30" rows="10" name="Textfeld"></textarea>

</form>

Im PHP kannst dann wiefolgt darauf zugreifen:


odbc_connect("Name_der_Access_Datenquelle_in_ODBC","Benutzer","Passwort");
//Erstellung der SQL-Anfrage
$ergebnis=odbc_exec("Name_der_Access_Datenquelle_in_ODBC",$SQL_Anfrage);
[/PHP]

Da es sich bei der Anfrage um einen String handelt kannst du (fast) jede SQL-Anweisung benutzen wie du sie aus Access kennst.

BSP:

[PHP]
$SQL_Anfrage ="UPDATE Tabelle SET Spalte='$Textfeld' WHERE PrimSchluessel=X";

Ich hab ne perl datei und dahinter dann eben die datenbank. Sonst nur so ankreuzfelder und jetzt soll eben noch ein textfeld mit rein. Die ankreuzfelder schreiben mir noten von 1-5 in die datenbank. Auf dem server läuft dann apache. Ohne text funktionierts also schon. Normalerweise kann das doch dann kein act sein das zu den bestehenden feldern noch ein text(bsw. ein name) in die datenbank geschrieben wird. Was musss ich den nun in html machen und was an der perl datei? In die daten bank muss ich doch dann eigentlich nur ein feld/spalte mit "name" einfügen,oder?

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.