hi ich weiss nicht wo dieser thread reingehört aber ich poste ihn mal hier 
folgender sachverhalt :
ich habe diese funktion:
	
im template newuser_threadbetreff ist nur der text $titel vorhanden und im template newuser_threadinhalt nur der text $text , in der tb steht  sowas wie "hi $name wir freuen uns..." nun möchte ich dass die variable $name auch umgewandelt wird, soll heißen das sie durch den username ersetzt wird , ist das möglich ? so wies jetzt ist läufts nicht !
					folgender sachverhalt :
ich habe diese funktion:
PHP Code:
	
	
function newuserthread($usid){
    global $db_zugriff,$n;
    $row2=$db_zugriff->query("Select useremail,username from bb".$n."_user_table where userid='$usid'");
    $row1=mysql_fetch_array($row2);
    $name=$row1['username'];
    $boardid=newusercheck('bid');$userid1=newusercheck('usid');
    $row3=$db_zugriff->query("Select username from bb".$n."_user_table where userid='$userid1'");
    $row4=mysql_fetch_array($row3);
    $user_name1=$row4['username'];$posticon="";
    $time = time();$uploadid=0;
    $info = $db_zugriff->query_first("SELECT threadthema,threadinhalt FROM bb".$n."_newuser");
    $text = $info[threadinhalt];
    $titel = $info[threadthema];
    eval ("\$subject = \"".gettemplate("newuser_threadbetreff")."\";");
    eval ("\$subject1 = \"".gettemplate("newuser_threadbetreff")."\";");
    eval ("\$message = \"".gettemplate("newuser_threadinhalt")."\";");
      $posticon=0;
    $db_zugriff->query("INSERT INTO bb".$n."_threads
(boardparentid,threadname,starttime,authorid,
author,lastposterid,timelastreply,topicicon,flags,closedby)
 VALUES ('$boardid','$subject','$time','$userid1',
'".addslashes(($user_name1))."','$userid1','$time',
'".addslashes($posticon)."','1','admin')");
            $nr = $db_zugriff->insert_id();
            $db_zugriff->query("INSERT INTO bb".$n."_posts (boardparentid,threadparentid,userid,posttime,
posttopic,message,posticon,disable_smilies,signature,ip) 
VALUES ('$boardid','$nr','$userid1','$time',
'$subject1','$message','$posticon','0','0','000.000.000.000')");
            $postid = $db_zugriff->insert_id();
            $db_zugriff->query("UPDATE bb".$n."_boards SET threads=threads+1,
 posts=posts+1, lastposttime = '$time', lastpostid = '$postid' 
WHERE boardid = '$boardid'");
                } 
EDIT: 
TobiaZ: Keiner hat was dagegen, wenn du deine Codes umbrichst!
          
 Moderator
Comment