Connecting to MySQL in PHP

Video loading...

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:05
    with Leanna Pelham
  • 0:08
    If you don't have the code
  • 0:10
    for the project downloaded yet, get it now.
  • 0:18
    After it downloads, unzip it.
  • 0:29
    Perfect.
  • 0:29
    All we need to do now is start the built in PHP
  • 0:32
    web server so we can execute our code.
  • 0:34
    Open up a terminal.
  • 0:36
    Move into the directory where you just unzipped the code.
  • 0:39
    And start the server.
Loading ...

Connecting to MySQL in PHP

Loading...

Now that we understand the basics of a MySQL database and using SQL queries to talk with it, in this tutorial we're going to see how to talk to our database from inside our PHP code. You can download the sample code below.

Downloads: 
Log in or sign up to download companion files.

Additional resources:
There are no resources for this video. If you believe there should be, please contact us.