$required_fields = array('username', 'password', 'password_again', 'email', 'selected');
Open your register.php in /www file and at line 8, find:
Code:$required_fields = array('username', 'password', 'password_again', 'email', 'selected');
Remove the fields you don't want as required ones.
if (empty($_POST) === false) {
// $_POST['']
$required_fields = array('username', 'password', 'password_again', '', '');
foreach($_POST as $key=>$value) {
if (empty($value) && in_array($key, $required_fields) === true) {
$errors[] = 'You need to fill in all fields.';
break 1;
[*]A valid email address is required.
[*]That email address is already in use.
<li>
Email:<br>
<input type="text" name="email">
</li>
if (empty($_POST) === false) {
// $_POST['']
$required_fields = array('username', 'password', 'password_again');
foreach($_POST as $key=>$value) {
if (empty($value) && in_array($key, $required_fields) === true) {
$errors[] = 'You need to fill in all fields.';
break 1;
if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) {
$errors[] = 'A valid email address is required.';
}
Make sure also between lines 147-150:
Code:<li> Email:<br> <input type="text" name="email"> </li>
There is no "..="email" required>" in there, if there is, remove it as I got above inside the CODE.
Not sure if you have to leave -> '', '' <-, by just removing all it should work:
EDIT: Also, if you want to remove all requirements, check the code above and it says $required_fields) === true), make it false.PHP:if (empty($_POST) === false) { // $_POST[''] $required_fields = array('username', 'password', 'password_again'); foreach($_POST as $key=>$value) { if (empty($value) && in_array($key, $required_fields) === true) { $errors[] = 'You need to fill in all fields.'; break 1;
EDIT2: Between line 66-68 delete this code:
PHP:if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) { $errors[] = 'A valid email address is required.'; }