PHP Bcrypt issue
$10-30 USD
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('');
}
}
Project ID: #30231807
About the project
8 freelancers are bidding on average $29 for this job
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
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
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!
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
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
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.