Make use of the newly copied PHP routines
authorJoey Schulze <joey@infodrom.org>
Thu, 6 Sep 2001 07:20:36 +0000 (07:20 +0000)
committerJoey Schulze <joey@infodrom.org>
Thu, 6 Sep 2001 07:20:36 +0000 (07:20 +0000)
src/LTOL/news/update.wml

index 22f39ed..ff44c8c 100644 (file)
@@ -1,22 +1,11 @@
 #include <ltol.style>
+#include <phptools.inc>
 
 <page func="Oldenburger LinuxTag" title="Update News">
 
-<?
-  function sql_prepare ($text)
-  {
-    # Der Himmel ist blau, das Wasser ist klar, die Vögel zwitschern
-    # draußen, doch PHP weigert sich beharrlich, vernünftig zu
-    # arbeiten.
-    #
-    # Problem: Im Form kommt " an, PHP macht daraus freundlicherweise \"
-    #          und schon sind unsere Daten in der SQL-DB kaputt.  Danke
-    # $mytext = ereg_replace ("\\\\", "\\\\", $text);
-    $mytext = ereg_replace ("\\\"", "\"", $text);
-    # $mytext = ereg_replace ("'", "\\'", $mytext);
-    return ($mytext);
-  }
+<sql_prepare>
 
+<?
   $dbh = pg_pconnect ("<dbhost>", "<dbport>", "<dbname>")
          or die("Unable to connect to SQL server");