PHP Bcrypt issue

Closed Posted 2 years ago Paid on delivery
Closed Paid on delivery

What could be the problem here?

I can't seem to login

public function login()

{

$email= $this->input->post('email', TRUE);

$hash = $this->input->post('password');

$password= password_verify('password', $hash);

$data['email'] = $email;

$data['password'] = $password;

if ((password_verify($this->input->post('password'), $hash))==1)

{

$sess_array=array();

$getdata=$this->Api_model->getSingleRow('admin',$data);

if($getdata)

{

if($getdata->status==1)

{

$this->session->unset_userdata($sess_array);

$sess_array = array(

'name' => $getdata->name,

'id' => $getdata->id,

);

$this->session->set_userdata( $sess_array);

$dataget['get_data'] =$getdata;

$dataget['see_data'] =$sess_array;

redirect('Admin/home');

}

else{

$this->session->set_flashdata['msg'] = 'Please enter valid Username or Password';

}

}

else

{

$this->session->set_flashdata('block', 'You action has been block. Contact to admin.');

redirect('');

}

}

else

{

$this->session->set_flashdata('msg', 'Please enter valid Username or Password');

redirect('');

}

}

PHP MySQL

Project ID: #30231807

About the project

8 proposals Remote project Active 2 years ago

8 freelancers are bidding on average $29 for this job

AltiuseCreaton

Hi, I can fix your PHP code. Let me know when you here to discuss more in detailed about Job. I am having 10 years experience on PHP development. You can check my profile : https://www.freelancer.com/u/AltiuseCreat More

$40 USD in 1 day
(116 Reviews)
7.4
nextwebMin

Hello. I'm a web developer with 5 + years experience in PHP and JavaScript. I have made bcrpyto and encrypto function in past project. I'll share my past project via chat. I hope to discuss more detail via chat. If you More

$50 USD in 1 day
(18 Reviews)
5.6
gustavofulanetto

Hi, What's the error you're getting when you try to log in? I'd like to know this to take a look at the code and try to find out the solution. Thanks!

$20 USD in 1 day
(40 Reviews)
4.5
dmitshegol

Hello. Hope you are doing well I am a full-stack web developer and a PHP/MySQL expert. While bringing a very high quality of work and agile speed of delivering projects, a skill that adorns me is making remarkably high More

$30 USD in 1 day
(4 Reviews)
2.2
armenwork1998

Hello, how are you? I am a php developer and I am interested in your job What is your acceptable budget? When do you need this project finished by? I can achieve the results that you are asking for. Thank you and best More

$20 USD in 1 day
(0 Reviews)
0.0
endiansign

Hi, I have experiences with PHP. After a quick glance, it seems the problem comes from the way you generate your hash from the plaintext password. Let's discuss first in order to know all the details.

$20 USD in 1 day
(0 Reviews)
0.0