übergabe einer array-variablen

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

  • #31
    hier der komplette quelltext seite 1:
    PHP-Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <
    html>
    <
    head>
    <
    meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <
    link rel="stylesheet" type="text/css" href="../../css/format.css">
    <
    title></title>
    </
    head>

    <
    body class="ad">
    <
    form name='formular' method='POST' action='test_2.php'><input type="hidden" name="alle" value="a:35:{i:0;s:46:\"a:link {color:#5957CE;text-decoration:none;}
    \";i:1;s:49:\"a:visited {color:#5957CE;text-decoration:none;}
    \";i:2;s:48:\"a:active {color:#5957CE;text-decoration:none;}
    \";i:3;s:47:\"a:hover {color:#FF0000;text-decoration:none;}
    \";i:4;s:66:\"a.objmon:link {color:#6666FF;text-decoration:none;font-weight:;}
    \";i:5;s:69:\"a.objmon:visited {color:#6666FF;text-decoration:none;font-weight:;}
    \";i:6;s:67:\"a.objmon:hover {color:#3300CC;text-decoration:none;font-weight:;}
    \";i:7;s:116:\".nav-top {color:#000000;background:#FFFFFF;font-size:10px;font-family:Verdana, Helvetica, Arial;font-weight:bold;}
    \";i:8;s:112:\"body {color:#000000;background:#FFFFFF;font-size:11px;font-family:Verdana, Helvetica, Arial;line-height:130%;}
    \";i:9;s:29:\".line {background:#000000;}
    \";i:10;s:33:\".ban_body {background:#FFFFFF;}
    \";i:11;s:91:\".ban-write {color:#000000;font-size:25px;font-family:\"Times New Roman\";font-weight:bold;}
    \";i:12;s:112:\".nav {color:#000000;background:#FFFFFF;font-size:11px;font-family:Verdana, Helvetica, Arial;font-weight:bold;}
    \";i:13;s:107:\".bottom {color:#000000;background:#ECECEC;font-size:17px;font-family:\"Times New Roman\";font-weight:bold;}
    \";i:14;s:30:\".blank {background:#FFFFFF;}
    \";i:15;s:118:\".nav-akt {color:#000000;background:#FFFFFF;font-size:10px;font-family:Verdana, Helvetica, Arial;font-weight:normal;}
    \";i:16;s:111:\".but-nav {color:#000000;background:#ECECEC;font-size:10px;font-family:Verdana, Helvetica, Arial;width:130px;}
    \";i:17;s:111:\".but-info {color:#000000;background:#FCFAF2;font-size:10px;font-family:Verdana, Helvetica, Arial;width:40px;}
    \";i:18;s:111:\".but-list {color:#000000;background:#ECECEC;font-size:10px;font-family:Verdana, Helvetica, Arial;width:70px;}
    \";i:19;s:112:\".but-grund {color:#000000;background:#ECECEC;font-size:10px;font-family:Verdana, Helvetica, Arial;width:90px;}
    \";i:20;s:108:\".drop {color:#000000;background:#FDFFF4;font-size:11px;font-family:Verdana, Helvetica, Arial;width:130px;}
    \";i:21;s:118:\".nav-angeb {color:#000000;background:#FFFFFF;font-size:11px;font-family:Verdana, Helvetica, Arial;font-weight:bold;}
    \";i:22;s:95:\".inp {color:#000000;background:#F6FFFF;font-size:10px;font-family:Verdana, Helvetica, Arial;}
    \";i:23;s:99:\".obj-mon {color:#000000;background:#FDFFF4;font-size:11px;font-family:Verdana, Helvetica, Arial;}
    \";i:24;s:115:\".show-n {color:#000000;background:#F7F7F7;font-size:10px;font-family:Verdana, Helvetica, Arial;font-weight:bold;}
    \";i:25;s:117:\".show-b {color:#000000;background:#F7F7F7;font-size:10px;font-family:Verdana, Helvetica, Arial;font-weight:normal;}
    \";i:26;s:122:\".show-textarea {color:#000000;background:#F7F7F7;font-size:11px;font-family:Verdana, Helvetica, Arial;line-height:130%;}
    \";i:27;s:93:\".t10 {color:#000000;font-size:10px;font-family:Verdana, Helvetica, Arial;line-height:130%;}
    \";i:28;s:93:\".t11 {color:#000000;font-size:11px;font-family:Verdana, Helvetica, Arial;line-height:130%;}
    \";i:29;s:111:\".t10f {color:#000000;font-size:10px;font-family:Verdana, Helvetica, Arial;line-height:130%;font-weight:bold;}
    \";i:30;s:111:\".t11f {color:#000000;font-size:11px;font-family:Verdana, Helvetica, Arial;line-height:130%;font-weight:bold;}
    \";i:31;s:111:\".t12f {color:#000000;font-size:12px;font-family:Verdana, Helvetica, Arial;line-height:130%;font-weight:bold;}
    \";i:32;s:90:\"#rund {border-width:1px;border-style:solid;border-color:#000000;margin:2px;padding:2px;}
    \";i:33;s:94:\"#rund-nav {border-width:1px;border-style:solid;border-color:#000000;margin:0px;padding:1px;}
    \";i:34;s:112:\".nam {color:#FFFFFF;background:#999999;font-size:20px;font-family:Verdana, Helvetica, Arial;font-weight:bold;}
    \";}" 
    /><input type='submit' value='speichern' class='but120ad'></form><pre>Array
    (
        [
    0] => a:link {color:#5957CE;text-decoration:none;}

        
    [1] => a:visited {color:#5957CE;text-decoration:none;}

        
    [2] => a:active {color:#5957CE;text-decoration:none;}

        
    [3] => a:hover {color:#FF0000;text-decoration:none;}

        
    [4] => a.objmon:link {color:#6666FF;text-decoration:none;font-weight:;}

        
    [5] => a.objmon:visited {color:#6666FF;text-decoration:none;font-weight:;}

        
    [6] => a.objmon:hover {color:#3300CC;text-decoration:none;font-weight:;}

        
    [7] => .nav-top {color:#000000;background:#FFFFFF;font-size:10px;font-family:Verdana, Helvetica, Arial;font-weight:bold;}

        
    [8] => body {color:#000000;background:#FFFFFF;font-size:11px;font-family:Verdana, Helvetica, Arial;line-height:130%;}

        
    [9] => .line {background:#000000;}

        
    [10] => .ban_body {background:#FFFFFF;}

        
    [11] => .ban-write {color:#000000;font-size:25px;font-family:"Times New Roman";font-weight:bold;}

        
    [12] => .nav {color:#000000;background:#FFFFFF;font-size:11px;font-family:Verdana, Helvetica, Arial;font-weight:bold;}

        
    [13] => .bottom {color:#000000;background:#ECECEC;font-size:17px;font-family:"Times New Roman";font-weight:bold;}

        
    [14] => .blank {background:#FFFFFF;}

        
    [15] => .nav-akt {color:#000000;background:#FFFFFF;font-size:10px;font-family:Verdana, Helvetica, Arial;font-weight:normal;}

        
    [16] => .but-nav {color:#000000;background:#ECECEC;font-size:10px;font-family:Verdana, Helvetica, Arial;width:130px;}

        
    [17] => .but-info {color:#000000;background:#FCFAF2;font-size:10px;font-family:Verdana, Helvetica, Arial;width:40px;}

        
    [18] => .but-list {color:#000000;background:#ECECEC;font-size:10px;font-family:Verdana, Helvetica, Arial;width:70px;}

        
    [19] => .but-grund {color:#000000;background:#ECECEC;font-size:10px;font-family:Verdana, Helvetica, Arial;width:90px;}

        
    [20] => .drop {color:#000000;background:#FDFFF4;font-size:11px;font-family:Verdana, Helvetica, Arial;width:130px;}

        
    [21] => .nav-angeb {color:#000000;background:#FFFFFF;font-size:11px;font-family:Verdana, Helvetica, Arial;font-weight:bold;}

        
    [22] => .inp {color:#000000;background:#F6FFFF;font-size:10px;font-family:Verdana, Helvetica, Arial;}

        
    [23] => .obj-mon {color:#000000;background:#FDFFF4;font-size:11px;font-family:Verdana, Helvetica, Arial;}

        
    [24] => .show-{color:#000000;background:#F7F7F7;font-size:10px;font-family:Verdana, Helvetica, Arial;font-weight:bold;}

        
    [25] => .show-{color:#000000;background:#F7F7F7;font-size:10px;font-family:Verdana, Helvetica, Arial;font-weight:normal;}

        
    [26] => .show-textarea {color:#000000;background:#F7F7F7;font-size:11px;font-family:Verdana, Helvetica, Arial;line-height:130%;}

        
    [27] => .t10 {color:#000000;font-size:10px;font-family:Verdana, Helvetica, Arial;line-height:130%;}

        
    [28] => .t11 {color:#000000;font-size:11px;font-family:Verdana, Helvetica, Arial;line-height:130%;}

        
    [29] => .t10f {color:#000000;font-size:10px;font-family:Verdana, Helvetica, Arial;line-height:130%;font-weight:bold;}

        
    [30] => .t11f {color:#000000;font-size:11px;font-family:Verdana, Helvetica, Arial;line-height:130%;font-weight:bold;}

        
    [31] => .t12f {color:#000000;font-size:12px;font-family:Verdana, Helvetica, Arial;line-height:130%;font-weight:bold;}

        
    [32] => #rund {border-width:1px;border-style:solid;border-color:#000000;margin:2px;padding:2px;}

        
    [33] => #rund-nav {border-width:1px;border-style:solid;border-color:#000000;margin:0px;padding:1px;}

        
    [34] => .nam {color:#FFFFFF;background:#999999;font-size:20px;font-family:Verdana, Helvetica, Arial;font-weight:bold;}

    )
    </
    pre></body>
    </
    html
    Zuletzt geändert von weserweb; 17.05.2003, 13:41.

    Kommentar


    • #32
      ok. hier ein anderer vorschlag.

      PHP-Code:

      //seite 1
      //viele hiddenfelder generieren für das array
      foreach($alle as $value)
      {
        echo 
      "<input type=\"hidden\" name=\"alle[]\" value=\"".addslashes($value)."\">\n";
      }

      // seite 2
      // die hiddenfeld sind nun in $_POST["alle"]
      // aber die slahes müssen wieder raus.

      foreach($_POST["alle"] as $key => $value)
      {
        
      $_POST["alle"][$key] = stripslashes($_POST["alle"][$value]);
      }

      // jetzt sollte es aber passen. oder? 
      INFO: Erst suchen, dann posten![color=red] | [/color]MANUAL(s): PHP | MySQL | HTML/JS/CSS[color=red] | [/color]NICE: GNOME Do | TESTS: Gästebuch[color=red] | [/color]IM: Jabber.org |


      Kommentar


      • #33
        @ Abraxax,

        ja, jetzt klappt es!

        erst einmal ganz herzlichen dank für euer engagement! das darf man wohl zu recht als aussergewöhnlich bezeichnen.

        aber dennoch:
        gerade die vielen hidden-felder wollte ich vermeiden.
        egal - wenn ich dafür eine glatte lösung finde, werde ich sie hier posten.

        nochmal: danke!

        Kommentar

        Lädt...
        X