I’m sad

connecting to database

Hi I am starting learning PHP and bought the book: PHP & MySQL the missing manual.
And here is my problem - I do not want to try things out on a rented server but instead I set up a local server with Aqua and PHP admin. I can follow the instructions in the book and code the HTML and PHP but how do I connect the lot to a database? Isn ́t that one of the essentials in working with PHP and MySQL? That does not seem to be covered in the book :-( It would have been nice to include that topic, at least in an appendix, or point out some recommended reading about the issue.

Regards Tora
1 person has
this question
  • Hi Tora. You'll want to read through Chapter 3 carefully. That chapter details downloading and installing MySQL on common platforms, connecting to the database, storing your credentials, and so forth. (In the printed book, this section starts on page 59 in my edition.)

    Then, when you're ready to connect your PHP scripts to MySQL, you'll want to look at Chapter 4, which details this process, starting on about page 91.

    Those two sections will give you everything you need.

  • (some HTML allowed)
    How does this make you feel?
    Add Image

    e.g. indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited kidding, amused, unsure, silly