so im turning to the many active members of this comunity.
My problem is (config file):
Defined here:
- Code: Select all
//If you wish to use "Guest" as the poster, please enter exactly as follows: '-1'
//otherwise enter the id number of the user you want to post the form
$user = $userdata['3'];
The insert code
- Code: Select all
$sql = "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum, $user, '', $current_time, '$user_ip', 1, 1, 1, 1)";
if (!$db->sql_query($sql, BEGIN_TRANSACTION))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
$post_id = $db->sql_nextid();
Error code.
- Code: Select all
DEBUG MODE
INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES (18, 2, , '', 1191560798, '1819bc87', 1, 1, 1, 1)
- Code: Select all
SQL:
VALUES (18, 2, , '',
poster_id is empty, suggesting the information was not properly saved in the session.
I have probably staired at the code way to long and missing the obvious. But any help would be apriciated.