🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
  • Seth Warner
    Seth Warner
    5,348 Points

    Okay so up until I added the defining config file I was fine.

    Posted November 27, 2015 12:25am by Seth Warner
    Seth Warner
    5,348 Points
    • PHP
    • Using PHP with MySQL
    • Querying the Database with PHP
    • Avoiding Duplication

    0 Answers

  • adrien kovanic
    adrien kovanic
    5,727 Points

    Hi I have an error 500 when trying to load the index.php page

    Posted November 4, 2015 7:49pm by adrien kovanic
    adrien kovanic
    5,727 Points
    • PHP
    • Using PHP with MySQL
    • Querying the Database with PHP
    • Avoiding Duplication

    1 Answer

  • Leigh Maher
    Leigh Maher
    21,830 Points

    How does the database.php know to get the values we defined in the config file?

    Posted July 13, 2015 1:09pm by Leigh Maher
    Leigh Maher
    21,830 Points
    • Development Tools
    • Using PHP with MySQL
    • Querying the Database with PHP
    • Avoiding Duplication

    3 Answers

  • Alan Guevara
    Alan Guevara
    7,247 Points

    Do we have to include config.php file into database.php?

    Posted June 10, 2015 9:37pm by Alan Guevara
    Alan Guevara
    7,247 Points
    • Development Tools
    • Using PHP with MySQL
    • Querying the Database with PHP
    • Avoiding Duplication

    1 Answer

  • Sean Lum
    Sean Lum
    11,949 Points

    Does the act of defining constants create a global level security vulnerability?

    Posted April 12, 2015 4:57pm by Sean Lum
    Sean Lum
    11,949 Points
    • Development Tools
    • Using PHP with MySQL
    • Querying the Database with PHP
    • Avoiding Duplication

    1 Answer

  • Johnatan Guzman
    PLUS
    Johnatan Guzman
    Courses Plus Student 2,360 Points

    It doesnt show single shirts page anymore

    Posted January 26, 2015 12:30pm by Johnatan Guzman
    Johnatan Guzman
    Courses Plus Student 2,360 Points
    • Development Tools
    • Using PHP with MySQL
    • Querying the Database with PHP
    • Avoiding Duplication

    1 Answer

  • SERGIO RODRIGUEZ
    SERGIO RODRIGUEZ
    17,532 Points

    Why is Randy using require instead of require_once?

    Posted January 2, 2015 11:26pm by SERGIO RODRIGUEZ
    SERGIO RODRIGUEZ
    17,532 Points
    • Development Tools
    • Using PHP with MySQL
    • Querying the Database with PHP
    • Avoiding Duplication

    0 Answers

  • Chi Lee
    Chi Lee
    3,431 Points

    Why is there no closing php tag in database.php?

    Posted November 23, 2014 1:16am by Chi Lee
    Chi Lee
    3,431 Points
    • PHP
    • Using PHP with MySQL
    • Querying the Database with PHP
    • Avoiding Duplication

    1 Answer

  • Joey L.
    Joey L.
    4,601 Points

    Randy included the PDO() object creation and database connection code in the same place as it initially was. Why?

    Posted November 10, 2014 9:23pm by Joey L.
    Joey L.
    4,601 Points
    • Development Tools
    • Using PHP with MySQL
    • Querying the Database with PHP
    • Avoiding Duplication

    1 Answer

  • Harry Nikolov
    Harry Nikolov
    6,131 Points

    Why is this message also displayed when I test the error code?

    Posted October 26, 2014 9:11am by Harry Nikolov
    Harry Nikolov
    6,131 Points
    • PHP
    • Using PHP with MySQL
    • Querying the Database with PHP
    • Avoiding Duplication

    0 Answers

  • trishadring
    trishadring
    4,599 Points

    Something went wrong. Its not even giving me an error message that it can't connect to the database

    Posted October 12, 2014 9:55pm by trishadring
    trishadring
    4,599 Points
    • PHP
    • Using PHP with MySQL
    • Querying the Database with PHP
    • Avoiding Duplication

    2 Answers

  • Adam Zuckerberg
    Adam Zuckerberg
    22,248 Points

    Which type of connection do we use: MySQL, MySQLi or PDO?

    Posted May 28, 2014 5:03pm by Adam Zuckerberg
    Adam Zuckerberg
    22,248 Points
    • PHP
    • Using PHP with MySQL
    • Querying the Database with PHP
    • Avoiding Duplication

    2 Answers

  • Syed Mahbub
    Syed Mahbub
    8,780 Points

    Setting up Inc files for DB Credentials

    Posted April 20, 2014 8:23am by Syed Mahbub
    Syed Mahbub
    8,780 Points
    • PHP
    • Using PHP with MySQL
    • Querying the Database with PHP
    • Avoiding Duplication

    0 Answers

  • carlosjimenez
    carlosjimenez
    5,504 Points

    ROOT_PATH . NOT WORKING

    Posted March 17, 2014 7:34pm by carlosjimenez
    carlosjimenez
    5,504 Points
    • PHP
    • Using PHP with MySQL
    • Querying the Database with PHP
    • Avoiding Duplication

    2 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.