i have the following variable with an array in config.php
:
$user_password = array(
'admin' => 'phpass:!2a!09!0VacTRBCSGujva0D474.Ce3XI6hEjb80/4VTYKGF0LFx9sIY/BdA.',
'test' => 'phpass:!2a!09!WFA38xA3BBdT.5nJVVMmBOQVAkyuAC/RluiN0ekNPAr0w6d4YBZK2',
'test2' => 'phpass:!2a!09!ZiysPdYPcL3tKpUiVFZLlOVw.l/E4paN6LVDCrRNCsResNex1NUmK'
);
I would like to add a new user from my login page, how would i go about adding new users in the config.php $user_password
array ?
Im not really sure how to start.
should i include the file or use require_once then edit the array and in config.php ..?
EG:
if (isset($_REQUIRE['login-btn'])) {
$username = $_REQUEST['user'];
$passwd = $_REQUEST['passwd'];
if (isset($username) && isset($passwd)) {
//code to add user an passwd to the config variable $user_passwd array
}
}
</div>