1

I already manage to create my database and table with the help of Can I create a database using PDO in PHP but I have difficulties with inserting my password_hash code with this setup page.

CREATE TABLE `users` (
`user_id` INT(11) NOT NULL AUTO_INCREMENT,
`password_hashcode` VARCHAR(60) NOT NULL DEFAULT '',
 PRIMARY KEY (`user_id`),
INDEX `FK_users_role_status` (`role_id`),
CONSTRAINT `FK_users_role_status` FOREIGN KEY (`role_id`) REFERENCES `role_status` (`role_id`)
 )
 COLLATE='utf8_general_ci'
 ENGINE=InnoDB
 AUTO_INCREMENT=80
 ;

 INSERT INTO `users`(`user_id`, `password_hashcode`) VALUES (1,'$2y$10$g7WTN4QEKH6VxjPX6Wfao.GuxYyIMTi4.E0c8BxJEjJDBkkt73JZO');

For example: '$2y$10**$g7WTN4QEKH6VxjPX6Wfao**.GuxYyIMTi4.E0c8BxJEjJDBkkt73JZO'
'$2y$10**$vrIbKaO5uIreh**.wGtYHn1OU/ttVXnWjZ16ZukPbqngwptawLlleU2'

Undefined variable: g7WTN4QEKH6VxjPX6Wfao

Undefined variable:  vrIbKaO5uIreh

Strangely, I don't get any error with that hash password
 '$2y$10$3awSIi/YVAVierYR79Vj0u9bAsLK00PMaHQAE6We7UWS7SzEavoAq'

How can I also inserted those hash values without affecting the password?

0 Answers0