Skip to main content

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

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

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

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • 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
      • • Vibe Coding
  • 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.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

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

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord