ive been trying to learn some php and i wanted to make a logger
I get user input, put in into an array and make it into json:
This is the class that gets the info:
<?php
class account_Creation
{
private $username;
private $password;
private $email;
//user input
public function user_input()
{
$username = 'username';
$password = "password";
$email = "email";
$result_array= compact("username","password", "email");
}
}
$account_creation= new account_Creation();
$account_creation-> user_input();
$logging= new Logging();
$logging-> json_Translator($result_array);
This is the class that translates it into json:
<?php
class Logging
{
public function json_Translator($data)
{
echo json_encode($data);
}
}
I get the error: Uncaught Error: Class 'Logging' not found How do i show the account creation class where the logging class is? I tried include but that did not work