PDA

View Full Version : Form variables to VB array issues


safiel
08-08-2005, 05:34 PM
I am trying to udpate a custom hack from 3.07 but am having problems processing the form output. I am trying to globalize the variables in an array but they are empty. I am sure I am just making a simple mistake.

Here's a snippet where its choking (i.e. disclaimer error gets triggered even though disclaimer is checked, i.e. $accept is set to 1).

$vbulletin->input->clean_array_gpc($_REQUEST, array(
'accept' => INT,
'sname' => STR,
'smail' => STR,
'mail' => STR,
'message' => STR,
'postid' => INT,
'version' => INT
));

if($vbulletin->GPC['accept'] != 1)
{
eval(standard_error('You need to accept the Disclaimer!'));
}


The issue is not with the form ($_request['accept']), but the processing. I'm hoping someone can see what I am doing wrong with the VB functions.

Andreas
08-08-2005, 05:44 PM
The First paramater of clean_[array_]gpc() must be 'r' (for $_REQUEST), 'g' (for $_GET), 'p' (for $_POST), 'c' ($_COOKIE) or 'f'($_FILES).

safiel
08-08-2005, 05:55 PM
Kirby,

Thanks very much! That was the issue and the resolution.