PHP 7 Gästebuch


Status
Dieses Thema wurde gelöst! Zur Lösung gehen…

gamma

Grünschnabel
#1
Wie mache ich folgenden code für ein Gästebuch PHP 7 kompatibel?

PHP:
$inhalt = ereg_replace("O:-)","<img class=\"gbuch_img\" src=\"$path_image/engel.gif\" alt=\"\"/>",$inhalt);
$inhalt = ereg_replace("O:)","<img class=\"gbuch_img\" src=\"$path_image/engel.gif\" alt=\"\"/>",$inhalt);

$cap_1 = ereg_replace("1","<img class=\"gbuchimg\" src=\"$imagepath/1.gif\" alt=\"Formular by www.caosweb.de\"/>",$cap_1);
$cap_1 = ereg_replace("2","<img class=\"gbuchimg\" src=\"$imagepath/2.gif\" alt=\"Formular by www.caosweb.de\"/>",$cap_1);
 

Shorty1968

Erfahrenes Mitglied
#5
Sah es bei deinem Versuch so aus?
PHP:
$inhalt = preg_replace("O:-)","<img class=\"gbuch_img\" src=\"$path_image/engel.gif\" alt=\"\"/>",$inhalt);
$inhalt = preg_replace("O:)","<img class=\"gbuch_img\" src=\"$path_image/engel.gif\" alt=\"\"/>",$inhalt);

$cap_1 = preg_replace("1","<img class=\"gbuchimg\" src=\"$imagepath/1.gif\" alt=\"Formular by www.caosweb.de\"/>",$cap_1);
$cap_1 = preg_replace("2","<img class=\"gbuchimg\" src=\"$imagepath/2.gif\" alt=\"Formular by www.caosweb.de\"/>",$cap_1);
 

gamma

Grünschnabel
#6
PHP:
$inhalt = preg_replace("/:-\)/","<img class=\"gbuch_img\" src=\"$path_image/smile.gif\" alt=\"\"/>",$inhalt);
$inhalt = preg_replace("/:-\\(/","<img class=\"gbuch_img\" src=\"$path_image/traurig.gif\" alt=\"\"/>",$inhalt);
$inhalt = preg_replace("/;-\\(/","<img class=\"gbuch_img\" src=\"$path_image/weinen.gif\" alt=\"\"/>",$inhalt);
$inhalt = preg_replace("/:-o/","<img class=\"gbuch_img\" src=\"$path_image/erstaunt.gif\" alt=\"\"/>",$inhalt);
$inhalt = preg_replace("/:-E/","<img class=\"gbuch_img\" src=\"$path_image/teufel.gif\" alt=\"\"/>",$inhalt);
$inhalt = preg_replace("/;-\)/","<img class=\"gbuch_img\" src=\"$path_image/zwinker.gif\" alt=\"\"/>",$inhalt);
$inhalt = preg_replace("/O:-\)/","<img class=\"gbuch_img\" src=\"$path_image/engel.gif\" alt=\"\"/>",$inhalt);
$inhalt = preg_replace("/8\)/","<img class=\"gbuch_img\" src=\"$path_image/cool.gif\" alt=\"\"/>",$inhalt);
$inhalt = preg_replace("/:-P/","<img class=\"gbuch_img\" src=\"$path_image/zunge.gif\" alt=\"\"/>",$inhalt);
$inhalt = preg_replace("/:-X/","<img class=\"gbuch_img\" src=\"$path_image/schweigen.gif\" alt=\"\"/>",$inhalt);
$inhalt = preg_replace("/:-D/","<img class=\"gbuch_img\" src=\"$path_image/zaehne.gif\" alt=\"\"/>",$inhalt);

$cap_1 = preg_replace("/1/","<img class=\"gbuchimg\" src=\"$imagepath/1.gif\" alt=\"Formular by www.caosweb.de\"/>",$cap_1);
$cap_1 = preg_replace("/2/","<img class=\"gbuchimg\" src=\"$imagepath/2.gif\" alt=\"Formular by www.caosweb.de\"/>",$cap_1);
$cap_1 = preg_replace("/3/","<img class=\"gbuchimg\" src=\"$imagepath/3.gif\" alt=\"Formular by www.caosweb.de\"/>",$cap_1);
$cap_1 = preg_replace("/4/","<img class=\"gbuchimg\" src=\"$imagepath/4.gif\" alt=\"Formular by www.caosweb.de\"/>",$cap_1);
$cap_1 = preg_replace("/5/","<img class=\"gbuchimg\" src=\"$imagepath/5.gif\" alt=\"Formular by www.caosweb.de\"/>",$cap_1);
$cap_1 = preg_replace("/6/","<img class=\"gbuchimg\" src=\"$imagepath/6.gif\" alt=\"Formular by www.caosweb.de\"/>",$cap_1);
$cap_1 = preg_replace("/7/","<img class=\"gbuchimg\" src=\"$imagepath/7.gif\" alt=\"Formular by www.caosweb.de\"/>",$cap_1);
$cap_1 = preg_replace("/8/","<img class=\"gbuchimg\" src=\"$imagepath/8.gif\" alt=\"Formular by www.caosweb.de\"/>",$cap_1);
$cap_1 = preg_replace("/9/","<img class=\"gbuchimg\" src=\"$imagepath/9.gif\" alt=\"Formular by www.caosweb.de\"/>",$cap_1);
$cap_1 = preg_replace("/0/","<img class=\"gbuchimg\" src=\"$imagepath/0.gif\" alt=\"Formular by www.caosweb.de\"/>",$cap_1);
 
Status
Dieses Thema wurde gelöst! Zur Lösung gehen…