Fairly new to coding and trying to teach myself PHP! However I have got myself stuck
I am updating Fragnader's Form to post which I had on my forum for PHPBB 3.0.X but 3.1 stopping it working as the submit_post function changed.
I thought I had it and have managed to beat 90% of the bugs out of it.... however the last one I just can't seem to figure out.
"Fatal error: Call-time pass-by-reference has been removed in /home2/newyorks/public_html/poster.php on line 78"
Can anyone help me with this?
Code: Select all
<?php define('IN_PHPBB', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); include($phpbb_root_path . 'includes/functions_posting.' . $phpEx); include($phpbb_root_path . 'includes/functions_display.' . $phpEx); include($phpbb_root_path . 'includes/message_parser.' . $phpEx); // Start session management $user->session_begin(); $auth->acl($user->data); //Yeah, I know this is not needed but I did it for simplicity $username = $_POST["username"]; $guid = $_POST["guid"]; $age = $_POST["age"]; $tracker = $_POST["trackid"]; $microphone = $_POST["mic"]; $vent = $_POST["vent"]; $banned = $_POST["banned"]; $reason = $_POST["reason"]; $ref = $_POST["ref"]; $ip = $_SERVER["REMOTE_ADDR"]; $message = "AA Username: $username PB Guid: http://www.hazardaaclan.com/history/accounthistory.php?guid=$guid Age: $age Tracker ID: http://aaotracker.com/usertracker.php?userid=$tracker Mic? $microphone Ventrilo? $vent Banned? $banned Reason for wanting to join? $reason Refered by: $ref"; $time = time(); // note that multibyte support is enabled here $rawsubject = "Americas Army Application for $username"; $subject = utf8_normalize_nfc($rawsubject, '', true); $message = utf8_normalize_nfc($message, '', true); // variables to hold the parameters for submit_post $poll = $uid = $bitfield = $options = ''; generate_text_for_storage($subject, $uid, $bitfield, $options, false, false, false); generate_text_for_storage($message, $uid, $bitfield, $options, true, true, true); $data = array( 'forum_id' => 21, 'topic_id' => 0, 'icon_id' => false, 'topic_type' => post_normal, 'enable_bbcode' => true, 'enable_smilies' => true, 'enable_urls' => true, 'enable_sig' => true, 'message' => $message, 'message_md5' => md5($message), 'bbcode_bitfield' => $bitfield, 'bbcode_uid' => $uid, 'post_edit_locked' => 0, 'topic_title' => $subject, 'notify_set' => false, 'notify' => false, 'post_time' => 0, 'forum_name' => '', 'enable_indexing' => true, 'force_approved_state' => true, 'force_visibility' => true, ); submit_post ( $mode, $subject, $username, $topic_type, &$poll, &$data, [ $update_message = true]); echo "Application Submitted, You may close this window."; ?>