Did not get any mail for verification.

the mail() function

Moderators: egami, macek, gesf

Post Reply
rhkhan18
New php-forum User
New php-forum User
Posts: 1
Joined: Sun Jan 02, 2022 4:19 am

After registration with an email ID the verification code were not send to the email to verify to login. Here is the code below:

NEED HELP BADLY !!!

Code: Select all

<?php

//verify_email.php

include('master/Examination.php');

$exam = new Examination;

if(isset($_GET['type'], $_GET['code']))
{
	if($_GET['type'] == 'master')
	{
		$exam->data = array(
			':email_verified'		=>	'yes'
		);

		$exam->query = "
		UPDATE admin_table 
		SET email_verified = :email_verified 
		WHERE admin_verification_code = '".$_GET['code']."'
		";

		$exam->execute_query();

		$exam->redirect('master/login.php?verified=success');
	}

	if($_GET['type'] == 'user')
	{
		$exam->data = array(
			':user_email_verified'	=>	'yes'
		);

		$exam->query = "
		UPDATE user_table 
		SET user_email_verified = :user_email_verified 
		WHERE user_verification_code = '".$_GET['code']."'
		";

		$exam->execute_query();

		$exam->redirect('login.php?verified=success');
	}
}


?>
Post Reply