Gumbo
Erfahrenes Mitglied
Probier mal Folgendes:
PHP:
<?php
$db_server = 'localhost'; // Datenbankserveradresse
$db_user = 'root'; // Datenbankbenutzername
$db_pass = '**********'; // Datenbankpasswort
$db_name = 'wstf'; // Datenbankname
$nr = '1'; // Boardnummer
$path = '/wbblite'; // Pfad zum Forum aus diesem Verzeichnis heraus (ohne abschließendes '/')
$threads = 5; // Anzahl der Angezeigten Themen
include '_forum.php';
$registerdate = time();
mysql_connect($db_server, $db_user, $db_pass) or die('ERROR: keine verbindung zum Forum');
mysql_select_db($db_name) or die('ERROR: konnte nicht zu datenbank "'.$db.'" verbinden');
$query = "
INSERT INTO
bb1_users
SET
`username` = '".mysql_real_escape_string($username)."',
`password` = '".$md5pwd."',
`email` = '".mysql_real_escape_string($mail)."',
`userposts` = '0',
`groupid` = '4',
`rankid` = '4',
`title` = '',
`regdate` = '1122727637',
`lastvisit` = '1122727637',
`lastactivity` = '1122727637',
`usertext` = '',
`signature` = '',
`icq` = '0',
`aim` = '',
`yim` = '',
`msn` = '',
`homepage` = '',
`birthday` = '0000-00-00',
`avatarid` = '0',
`gender` = '0',
`showemail` = '1',
`admincanemail` = '1',
`usercanemail` = '1',
`invisible` = '0',
`usecookies` = '1',
`styleid` = '0',
`activation` = '9814928',
`blocked` = '0',
`daysprune` = '0',
`timezoneoffset` = '1',
`startweek` = '0',
`dateformat` = 'd.m.y',
`timeformat` = 'H:i',
`emailnotify` = '0',
`buddylist` = '',
`ignorelist` = '',
`receivepm` = '1',
`emailonpm` = '0',
`pmpopup` = '0',
`umaxposts` = '0',
`showsignatures` = '1',
`showavatars` = '1',
`showimages` = '1',
`nosessionhash` = '1',
`ratingcount` = '0',
`ratingpoints` = '0',
`threadview` = '0'
";
mysql_query($query) or dir(mysql_error().'<pre>'.htmlspecialchars($query).'</pre>');
$insertid = mysql_insert_id();
…
?>