heyjohnmurray Posted October 3, 2012 Share Posted October 3, 2012 Can someone tell me why I need to write "return array(true,$row)" on line 65 of script 12.2. The book explanation didn't help and I couldn't find much clarification elsewhere online. I understand what it does just not why I need to write the Boolean portion. Thanks! Link to comment Share on other sites More sharing options...
HartleySan Posted October 3, 2012 Share Posted October 3, 2012 Because when the check_login() function is called, you want to return two pieces of information to the user: whether the login was successful and the data retrieved from the MySQL query. Step 10 on page 375 explains this. Keep in mind that the check_login() function is used in later chapters to ease the process of checking login credentials. As such, to see how the function is actually used, you'll need to see the later chapters. 2 Link to comment Share on other sites More sharing options...
Recommended Posts