I have create register and login form using php. And i had took the source from google.
So i have added all the corresponding code, when run index.php.
It sh
I suffered this error too. I did following things: 1. find out the port number used by mysql. In phpmyadmin, I ran the following sql:
show variables;
it shows a list of variables of mysql. scroll down, you will find port number.
$dsn = 'mysql:host=127.0.0.1;port=3307; dbname=learnphpfast';
it worked like a charm!