Hello,
I'm starting with object-oriented programming and I have the problem that I do not know how to efficiently manage captured with methods.
For example:
I Checks if the given login is the same as that stored in the variable.
I know that I can refer to it by, for example:
I have also:
And now my question in the style of dump question. How to do it when I want to show the method "afterloggin" only if the method valid_login_name () returns the result from the first condition?
I'm starting with object-oriented programming and I have the problem that I do not know how to efficiently manage captured with methods.
For example:
PHP:
class logowanie {
public function valid_login_name() {
$username = $_GET['username'];
$login_name = 'd56b6asdsada53855679cb1d252da';
if(md5($username) === $login_name ){
echo "extra";
} elseif(md5($username) !== $login_name
&& !empty($username) ){
echo "błedny login";
} elseif(md5($username) == null) {
echo "nie podales loginu";
}
I Checks if the given login is the same as that stored in the variable.
I know that I can refer to it by, for example:
PHP:
$login= new logowanie();
$login->valid_login_name();
I have also:
PHP:
class pozalogowaniu {
public function afterloggin(){
header("Location: [URL unfurl="true"]http://www.example.com/");[/URL]
}
}