Modify a PHP login script by adding PHP PDO - repost

Closed

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 the script to have following modification and but maintain largely original code:

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_ERRMODE, PDO::ERRMODE_EXCEPTION);

$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

$this->hash($this->pass);

$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);

$statement->execute();

}

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

Skills: MySQL, PHP

See more: login php code with mysql, php pdo, php login, pdo, need a new security code, 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, repost modification, php repost script, php security login, login example

Project ID: #4352358

16 freelancers are bidding on average $40 for this job

toinnisfree

quick pro help. ftp and milestone required.

$65 USD in 1 day
(531 Reviews)
7.9
pentium10

Professional work from professionals!

$50 USD in 1 day
(214 Reviews)
6.8
AdamsK

Ready for service sir, thanks

$40 USD in 1 day
(64 Reviews)
5.4
slaviktim

Hello. We have the php/mysql experience since 2006. And we hope we will do this small work for you fast and clean. Regards, Slava.

$40 USD in 2 days
(39 Reviews)
5.2
infowaysl

We have 8+ years experience in web development in php, we are ready to work with you, please check my "PMB".

$45 USD in 1 day
(12 Reviews)
5.5
samkaranja

As discussed

$35 USD in 1 day
(54 Reviews)
5.1
muhammadghasan

Please check your PMB, Thanks

$50 USD in 1 day
(21 Reviews)
4.9
onlymaj

Hi .a security expert. ready to start !

$40 USD in 3 days
(8 Reviews)
3.9
darkerbg

I'm ready to do it!

$30 USD in 1 day
(3 Reviews)
2.9
CARLOSHUGGINS

Hi I'm a PHP expert with more than 12 years of experience... I'm a responsable, honest hard working professional.... I'm here to serve you... thanks for considering my proposal.

$35 USD in 3 days
(2 Reviews)
2.8
lexmat

Dear Sir, i have 4+ years experience. please see PMB Thanks.

$50 USD in 7 days
(3 Reviews)
2.6
rsen75

i have over 14 years of web development and designing experience, Kindly check PM

$40 USD in 3 days
(2 Reviews)
2.4
ITdepartment

Hi there, web programmer expert ready to start right away. It's a simple project for me, looking forward working with you, regards

$40 USD in 1 day
(1 Review)
1.4
sabhi616

will be completed in a day.

$30 USD in 1 day
(0 Reviews)
0.0
ramsr29

Hi, Greetings! Myself Sita Ram from India a Web Designer & Developer with the +2 years of experience in Photoshope, PHP/MySql, WordPress, Open cart,ocommerce, Prestashop, CodeIgniter, CorePHP,HTML5,css, jquery and More

$40 USD in 3 days
(0 Reviews)
0.0
leisniel

hello. I am a Cuban programmer with extensive experience and I have really wanted to work and make new projects. Please check the private message.

$35 USD in 3 days
(0 Reviews)
0.0
shaeed019208789

Hello, I think I can help. Just contact with me. Thanks

$30 USD in 3 days
(0 Reviews)
0.0
gimli2

I can do it for you - 10 years experience with php.

$35 USD in 2 days
(0 Reviews)
0.0