2012-08-22, 12:13 AM
Cheers Omar
Is this correct?
That seems to work ok, is there a way I could use inline_error() though as I'd like to inform the user that they've failed the verification where it'd usually say "The message is missing".
Thanks
Is this correct?
function validate_input()
{
global $mybb;
session_start();
if($mybb->input['rand_code'] != $_SESSION['rand_code'] || !$_SESSION['rand_code']){
$errors = inline_error('$foo is no true, please try again.');
return false;
}else{
return true;
}
}
function verify_newreply_do_newreply_start(){
if(!($valid = validate_input()))
{
error($valid);
exit;
}
else{
// add form data processing code here
echo '<strong>Verification successful.</strong>';
// the script will conitnue unless using exit; here
}
}
That seems to work ok, is there a way I could use inline_error() though as I'd like to inform the user that they've failed the verification where it'd usually say "The message is missing".
Thanks
MyBB Support Technician
Please do not PM me for support.
MyBBatically - A quick and easy way to update your board!
Please do not PM me for support.
MyBBatically - A quick and easy way to update your board!