Hey guys! So i’m trying to log information from a form into the database, but it’s not working for some reason. I’ve been looking over this code for too long, can someone else spot the error?
public function log_client(){
if($this->is_valid() == true){
$log_client_query ='insert into client values("0","'.$this->name.'","'.$this->sex.'","'.$this->age.'","'.$this->doctor.'");';
$log_client = $this->link->query($log_client_query);
if($log_client){
if($this->log_info() == true){
echo "success";
if($this->send_email() == true){
echo "successful";
}else{
echo "failure";
}
}else{
echo "failure";
}
}else{
echo "An Insert Error Has Occurred";
}
}else{
$this->show_errors();
}
I’m passing the is_valid() check, but not the insert into database check. Any suggestions?