<?php require('config.php'); class kaamdhenu extends config{ private $preparequery, $executequery; public function setter(){ $this->executequery = mysqli_query($this->conn,$this->preparequery); } function registeruser(){ $this->preparequery = "INSERT INTO kaamdhenu_users(firstName,lastName,password,email,phone,gender,sec_question,sec_answer) VALUES ('".$_POST['fname']."', '".$_POST['lname']."','".$_POST['password']."', '".$_POST['email']."','".$_POST['phone']."','".$_POST['gender']."','".$_POST['squestion']."','".$_POST['sAnswer']."')";$this->setter(); if($this->executequery){ echo "Successfully Registered"; }