I'm working on a social network and if a username or email is the same I don't want to enter the details into the MySQL database.
Here's the PHP I'm using:
if (isset($_POST['username']) && isset($_POST['password'])){
$datejoined = date('m/d/Y h:i:s a', time());;
$verified = 0;
$username = $_POST['username'];
$email = $_POST['email'];
$password = $_POST['password'];
$query = "INSERT INTO `members` (username, password, email, verified, datejoined)
VALUES ('$username', md5('$password'), '$email', '0', '$datejoined')";
Some help would really be appreciated!