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.

input feld mit sql ausgabe

Empfohlene Antworten

Veröffentlicht

Moin,

ich habe ein Input Feld, in welchem der ein Datensatz aus einer mySQL DB ausgegeben werden soll. Wenn ich es nun im value="" Feld ausgebe, zeigt es mir jedoch nur das 1. Wort an. Längere Sätze erscheinen nicht. der Inhalt in der DB stimmt natürlich. Eine Textarea möchte ich nicht benutzen :)

Gibt es da einen Befehl der eingefügt werden muss?

Hallo,

dann hast du den Wert der Option value nicht in doppelte Hochkommata gepackt.

Beispiel wie es sein sollte:

<input type="text" value="Hallo dies ist ein Test">

oder in php:

echo '<input type="text" value="'.$value.'">';

Gruß Jaraz

doch doch:

echo('<input type=text name="neu_name" CLASS="Eingabe" size=25 maxlength=255 value="'.$datensatz[name].'">');

wie gesagt, von z.b. einer längeren Aufzählung ala "Auto, Computer, Kino" erscheint im Input Feld jediglich "Auto, "

Und du bist sicher, dass nicht schon in $datensatz[name] nur "Auto, " drin steht?

Gruß Jaraz

der inhalt der tbl stimmt leider :(

Das der Inhalt der Tabelle stimmt, glaube ich dir aber stimmt auch der Inhalt der Variable $datensatz[name]?

 
<html>
<head>
</head>
<body>
<?php
$datensatz[name]="Auto, Computer, Kino";
echo('<input type=text name="neu_name" CLASS="Eingabe" size=25 maxlength=255 value="'.$datensatz[name].'">');
?>
</body>
</html>[/PHP]

Funktioniert bei mir und ich wüßte auch keinen Grund warum es nicht funktionieren sollte.

Gruß Jaraz

mach doch mal ein

$db_result = mysql_fetch_array($result_abfrage),

var_dump($db_result);

dann siehst du den inhalt das resultats.

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.