Var in Textarea

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Var in Textarea

    Hallo

    wie bekomme ich den Inhalt der Variable $Beschreibung in das Formularobjekt Textarea ??
    und das gleiche Problem stellt sich bei einem Textfeld

    folgender text steckt in einer HTM-datei .. diese wird aber aus einer PHP mit include aufgerrufen. die htm iss nur das template.


    PHP-Code:

    $Beschreibung 
    "bla";
    $GPS_1  "GPS bla";

    // ------------------ textarea
    <textarea name="Beschreibung" cols="60" rows="8">$Beschreibung</textarea>

    // ------------------ textfield
    <INPUT TYPE="text" NAME="GPS_1" SIZE="15" MAXLENGTH="15" VALUE="$gps_1"
    PHP - ich weiß zwar nicht wie es funzt .. aber ich finds geil (bin noch Anfänger)

  • #2
    entweder
    PHP-Code:
    <textarea name="Beschreibung" cols="60" rows="8"><? $Beschreibung ?></textarea>
    oder
    PHP-Code:
     echo '<textarea name="Beschreibung" cols="60" rows="8">'.$Beschreibung.'</textarea>'
    gruss
    peter
    Nukular, das Wort ist N-u-k-u-l-a-r (Homer Simpson)
    Meine Seite

    Kommentar


    • #3
      Hier für dein Textfeld:

      PHP-Code:
      <INPUT TYPE="text" NAME="GPS_1" SIZE="15" MAXLENGTH="15" VALUE="<?=$gps_1?>">
      Andreas
      ....... .:[s|Y|n]:. . .:[www.syntheme.de]:. . .:[:-)]:. .......

      Kommentar


      • #4
        Hallo

        erstmal danke für die beiden Antworten .. leider beides nicht richtig.
        habe aber durch diese Inspiration und tüfteln die Lösungen gefunden.


        hier nun geprüft und getetest
        PHP-Code:
        $Beschreibung = "bla";
        $GPS_1  = "GPS bla";

        //  textarea
        <textarea name="Beschreibung" cols="60" rows="8"><?PHP echo "$Beschreibung";?></textarea>

        // textfeld
        <INPUT TYPE="text" NAME="GPS_1" SIZE="15" MAXLENGTH="15" VALUE="<?php echo "$GPS_1";?>">
        Zuletzt geändert von Burni; 27.11.2002, 18:55.
        PHP - ich weiß zwar nicht wie es funzt .. aber ich finds geil (bin noch Anfänger)

        Kommentar


        • #5
          Kropfs zweites Beispiel hätte klappen sollen.

          Kommentar


          • #6
            PHP-Code:
            <INPUT TYPE="text" NAME="GPS_1" SIZE="15" MAXLENGTH="15" VALUE="<?php echo "$GPS_1";?>">

            und

            <INPUT TYPE="text" NAME="GPS_1" SIZE="15" MAXLENGTH="15" VALUE="<?=$GPS_1?>">
            sind funktional absolut identisch.

            <?=$GPS_1?> ist die kurzform von <?php echo "$GPS_1";?>

            Andreas
            ....... .:[s|Y|n]:. . .:[www.syntheme.de]:. . .:[:-)]:. .......

            Kommentar


            • #7
              Hat das jemand bezweifelt?

              Kommentar


              • #8
                BTW: Die kuzform klappt nicht immer. Kann sein, dass es in der INI deaktiviert wurde/ist.

                Kommentar

                Lädt...
                X