Drew2 Posted November 13, 2020 Report Posted November 13, 2020 (edited) I'm on the PHP Logic with OOP section, and have what I think may be a pretty simple question. In v_login.php, where I see the login form, line 27 for example has this code: <input type="password" name="password" value="<?php echo $this->getData('input_pass'); ?>"> - This line of code takes the user input, and spits it into the form for the user to see. Then, in login.php, there is this code on line 30: $_SESSION['username'] = $Template->getData('input_user'); - this line of code adds to the $_SESSION variable. As v_login.php is included in login.php, why are there two different ways of calling the getData function? Shouldn't there just be one way to call the function, given v_login.php is included in login.php? Thanks, Andrew Edited November 13, 2020 by Drew2
administrator Posted December 22, 2020 Report Posted December 22, 2020 I would have look at the code and I am guessing Ben explained the reasons. That said, in programming, there are often many ways to do something.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now