I have a Class named Register.class.php
which goes like this:
<?php
class Register
{
private $db;
public function __construct()
{
$this->db = new Connection();
$this->db = $this->db->dbConnect();
}
public function NewAdmin($username,$email,$password,$groups,$level)
{
if(!empty($username)&&!empty($email)&&!empty($password)&&!empty($groups)&&!empty($level))
{
$reg = $this->db->prepare("INSERT INTO admins (user_name, email_address, password_hash, group_admin, date_joined, admin_level) VALUES ( ?, ?, ?, ?, NOW(), ?)");
$reg->bindParam(1,$username);
$reg->bindParam(2,$email);
$reg->bindParam(3,$password);
$reg->bindParam(4,$groups);
$reg->bindParam(5,$level);
$reg->execute();
}
}
}
?>
And I call this method like this:
$registration = new Register();
$registration->NewAdmin($username,$email,$password,$groups,$level);
But now I want to show a success message like New Admin Has Been Added inside the NewAdmin
method...
So please can you tell me how can I do that?