2012-07-23, 01:13 PM
Ok thanks, seems to work fine now!
Last question (I promise )
How can I create a log? So when an admin submits the form, it creates a log which says there username and all the details of what was submitted?
Cheers
Edit: Also how could I add the (intval($mybb->input['rec_comment'])) to only allow them to type in numbers in the text box?
This is the code:
Thanks a lot, Jammer +Rep
Last question (I promise )
How can I create a log? So when an admin submits the form, it creates a log which says there username and all the details of what was submitted?
Cheers
Edit: Also how could I add the (intval($mybb->input['rec_comment'])) to only allow them to type in numbers in the text box?
This is the code:
/*receiving id*/ $addform_container->output_row($lang->add_rep_to_uid, "", $addform->generate_text_box('rec_uid', '', array('id' => 'rec_uid')), 'rec_uid');
/*uid giving*/ $addform_container->output_row($lang->add_rep_from_uid, "", $addform->generate_text_box('from_uid', '', array('id' => 'from_uid')), 'from_uid');
/*PID of rep*/ $addform_container->output_row($lang->add_rep_pid, "", $addform->generate_text_box('rec_post', '', array('id' => 'rec_post')), 'rec_post');
/*Amount of rep*/ $addform_container->output_row($lang->add_rep_amount, "", $addform->generate_text_box('rec_amount', '', array('id' => 'rec_amount')), 'rec_amount');
/*UNIX timestmp*/ $addform_container->output_row($lang->add_rep_unix, "", $addform->generate_text_box('unix_time', '', array('id' => 'unix_time',)), 'unix_time');
/*Rep Comment*/ $addform_container->output_row($lang->add_rep_comment, "", $addform->generate_text_area('rec_comment', '', array('id' => 'rec_comment')), 'rec_comment');
$addform_container->end();
$rec_uid = $db->escape_string($mybb->input['rec_uid']);
$from_uid = $db->escape_string($mybb->input['from_uid']);
$rec_post = $db->escape_string($mybb->input['rec_post']);
$rec_amount = $db->escape_string($mybb->input['rec_amount']);
$unix_time = $db->escape_string($mybb->input['unix_time']);
$rec_comment = $db->escape_string($mybb->input['rec_comment']);
Thanks a lot, Jammer +Rep