Modify a PHP login script by adding PHP PDO

We need help for a small project from PHP expert who can handle PHP POD very well. If it goes well, there will be more projects coming.

We got a PHP login script that works very well but we need to add some security features to make it more secure. We want to the script that has following modification:

1. Use PHP PDO to connect mysql database. Please see the example:

try {

$db = new PDO("mysql:host=".DBHOST.";dbname=".DBNAME, DBUSER, DBPASS);


$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);

}catch (Exception $e){

die('Cannot connect to mySQL server.');


2. Use PHP PDO to interact with mysql database. See the example:

function create_account(){

//Create new account


$sql = 'INSERT into users (username, password, email) VALUES (:username, :password, :email)';

$statement = $this->db->prepare($sql);

$statement->bindParam(':username', $this->user, PDO::PARAM_STR);

$statement->bindParam(':password', $this->pass, PDO::PARAM_STR);

$statement->bindParam(':email', $this->email, PDO::PARAM_STR);



3. After modification, the scrip will be working smoothly.

Skills: MySQL, PHP

See more: login script, php pdo, php login, pdo, adding user password, php script execute, use php, php function secure, php mysql sql example, mysql sql function, sql statement help, php connect sql server, php connect mysql, mysql php login, php login script email, mysql php email script, php sql script project, php login users, execute sql script, user login php mysql pdo, php security login, login example, small project php sql, mysql password php, pdo mysql

About the Employer:
( 0 reviews ) United States

Project ID: #4352258

6 freelancers are bidding on average $37 for this job


Hi, i can do this!

$40 USD in 3 days
(36 Reviews)

I am very willing and ready to work on your project, quality of work is guaranteed as you can see from my reviews of past jobs

$35 USD in 1 day
(52 Reviews)

Ready to do this.

$40 USD in 2 days
(35 Reviews)

"This is not genric message we have properly read your project and intrested for that " we are a Team of professionals having good experience of various projects. I will really appreciate if you can share your query More

$45 USD in 1 day
(7 Reviews)

hi, i can do this job

$30 USD in 3 days
(2 Reviews)

L'efficacité dans la rapidité

$30 USD in 1 day
(0 Reviews)