How to Connect to a Database by Using PHP PDO

18
7



In this tutorial, I show you how to connect to a database by using PHP PDO.

LINKS

Files

PDO Attributes

AFFILIATE STUFF (thank you for the support!)
💰 I am an Amazon Affiliate and by using these referral links you can support this channel.

HTML & CSS Book (recommended):
Javascript & jQuery Book (recommended):
PHP Book:
DELL XPS 15 (my laptop):
Blue Yetti Microphone (my mic):
Amazon Echo:
Amazon Echo Dot:

Thank you for using these links!

Nguồn: xemhai.org

Xem thêm bài viết khác: https://xemhai.org/game/

18 COMMENTS

  1. .nice. Would you put the db code in a class normally or just keep it open in its own file like in your tuts and include it? thx

  2. How would you implement this with html? Eg creating a html webpage but wanting to connect it to a database so it actually shows the webpage and not just “connected”

  3. Can anyone tell me that what exactly setAttribute does. I have this piece of code "setAttribute(PDO::ERRMODE, ERRMODE_SILENT)" and per my knowledge prevails it must return the error code whereas in actual its actually giving me the whole error. Thanks.

  4. YOU ARE ABSOLUTELY AMAZING !
    I had my database already connected, but whenever I wanted to truly understand what the code meant I found that people usually just recycles code instead of understanding what it is about.
    I understood everything clearly , now I can go on with more complicated things.
    Thank you so much for this video, amazingly explained!!

LEAVE A REPLY

Please enter your comment!
Please enter your name here