<?php $username = 'xyz'; $password = 'abz'; $email = 'sdfs@example.com'; $isValid = true; if (empty($password)) { echo 'You need to enter a Password'; $isValid = false; } if (empty($username)) { echo 'You need to enter a Username'; $isValid = false; } if (empty($email)) { echo 'You need to enter a Email Address'; $isValid = false; }elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) { echo "You need to have a valid Email Address"; $isValid = false; } echo 'Is valid:' . ($isValid ? 'yes' : 'no');
You have javascript disabled. You will not be able to edit any code.