• Resolved Raider000

    (@raider000)


    Hi

    Is it possible to get the single variables from a class, when it looks e.g like this?

    function cl_validate() {
    		if (isset($_GET['cl_name']) && !empty($_GET['cl_name'])) : $cl_name = $_GET['cl_name'];
    		endif;
    		if (isset($_GET['cl_email']) && !empty($_GET['cl_email'])) : $cl_email = $_GET['cl_email'];
    		endif;
    		if (isset($_GET['cl_text']) && !empty($_GET['cl_text'])) : $cl_text = $_GET['cl_text'];
    		endif;
    }
    
    function cl_send() {
    		$name = $this->cl_validate()->$cl_name
    }

    $name should be $cl_name. Both are in the same class.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to get variable from another function?’ is closed to new replies.