Formular Problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Formular Problem

    Ich verwende ein ganz normales online Formular, welches die Daten als .csv speichert. Jetzt haben wir das Problem, dass ab und zu Zeilenumbrüche innerhalb eines Datensatzes vorkommen, die dort eigentlich nicht sein dürften. Das Script haut die Zeichen /n und /r aus dem Datensatz raus. Hat jemand eine Idee wieso es noch immer zu diesem Zeilenumbruch aus Input Feldern kommen kann?

  • #2
    Das Script haut die Zeichen /n und /r aus dem Datensatz raus.
    Dann klappt das wohl nicht richtig! Vielleicht mal die Codestelle hier posten!

    Comment


    • #3
      Hier der Code:


      foreach($this->_PARAM['params'] as $key => $value)
      {
      // if($value != '')
      if(1 == 1)
      {
      // $_SESSION['form']['params'][$key] = $value;
      $replacement_array = array(';', '\r\n', '\r', '\n');
      $_SESSION['form']['params'][$key] = str_replace($replacement_array, ' ', $value);
      }

      Comment


      • #4
        http://www.php-resource.de/forum/sho...threadid=50454

        Comment


        • #5
          PHP Code:
          foreach($this->_PARAM['params'] as $key => $value)
          {
          $replacement_array = array(';''\r\n''\r''\n');
          $_SESSION['form']['params'][$key] = str_replace($replacement_array' '$value);

          Comment


          • #6
            Schonmal so probiert?
            PHP Code:
            $replacement_array = array(';'"\r\n""\r""\n"); 
            Gruss

            tobi
            Gutes Tutorial | PHP Manual | MySql Manual | PHP FAQ | Apache | Suchfunktion für eigene Seiten

            [color=red]"An error does not become truth by reason of multiplied propagation, nor does truth become error because nobody sees it."[/color]
            Mohandas Karamchand Gandhi (Mahatma Gandhi) (Source)

            Comment

            Working...
            X