Not understanding how PHP works when connecting using MySQL?

Any script that has to access a database will need the connection.

When I abandoned mysql, I first chose mysqli for similar reasons. I thought the syntax looked more familiar and pdo looked complex and strange to me.
But when I did try pdo, I was surprised how easy I found it to make the transition and I much prefer using pdo now.

@colshrapnel has written a tutorial on pdo.

1 Like