Jump to content
Larry Ullman's Book Forums

SNK111

Members
  • Posts

    1
  • Joined

  • Last visited

SNK111's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi Larry, first of all, thankyou for writing such a helpful book :-) As per the book examples, if I have a webpage that connects to the database, I need to include/require the config.inc.php file and than 'require' the MYSQL constant (defined in the config file). My undestanding is that the above action will include the methods present in the two files 'mysql.inc.php' and 'config.inc.php' as well as start the session. However, what if I require a database connection in a page that has nothing to display; instead it will simply be used to retrieve/SELECT some data (and then send it via JSON format for use in a JQuery ajax function)? Will including the two files mentioned above and the subsequent inclusion of the unnecessary functions (functions such as the "redirect_invalid_user()" present in the config.inc.php file, which are unnecessary in this case) as well as starting the session result in any perfomance degradation? Is there a 'more professional' way to handle such a scenario? Thanks in advance for your response.
×
×
  • Create New...