$register_data = array(
'name' => $_POST['username'],
'password' => $_POST['password'],
'email' => $_POST['email'],
'created' => time(),
'ip' => ip2long(getIP()),
'flag' => $_POST['flag'],
'premdays' => '30' /* Add this line */
);
$config['free_premdays'] = '30';
$register_data = array(
'name' => $_POST['username'],
'password' => $_POST['password'],
'email' => $_POST['email'],
'created' => time(),
'ip' => ip2long(getIP()),
'flag' => $_POST['flag'],
'premdays' => $config['free_premdays'] /* Add this line */
);
second one with config doesn't work but the first one yes, it workshttps://github.com/Znote/ZnoteAAC/blob/master/register.php#L113
PHP:$register_data = array( 'name' => $_POST['username'], 'password' => $_POST['password'], 'email' => $_POST['email'], 'created' => time(), 'ip' => ip2long(getIP()), 'flag' => $_POST['flag'], 'premdays' => '30' /* Add this line */ );
or add in config.php
and then in register.phpPHP:$config['free_premdays'] = '30';
PHP:$register_data = array( 'name' => $_POST['username'], 'password' => $_POST['password'], 'email' => $_POST['email'], 'created' => time(), 'ip' => ip2long(getIP()), 'flag' => $_POST['flag'], 'premdays' => $config['free_premdays'] /* Add this line */ );
it should work