Drew2 Posted November 13, 2020 Report Share 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 Quote Link to comment Share on other sites More sharing options...
administrator Posted December 22, 2020 Report Share 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.