I just started learning OOP and I have a problem here. I've tried to search needed information, but couldn't find it... My task is to insert values to the database table and I need to know how can I assign the values with the $_POST method? I'm trying out like this:
class Users extends Connection{
public $value1;
public $value2;
public $value3;
public function __construct()
{
$this->value1= $_POST['value1'];
$this->value2= $_POST['value2'];
$this->value3= $_POST['value3'];
}
But it's printing errors that the index is undefined (Undefined index: value1). Thanks for any help.