Welcome Guest, Not a member yet? Register   Sign In
Login form posting username = 0 and passord = md5 of 0 ...

I use the exact same login form on another CI site hosted on the same server

I have been trying to fix this for hours, all the same libraries and helpers are loaded.

Its just like the form never gets any info... what can be different I have done ?

The site works in every other way, there are selects that go to the database en get other things...

function validate()

  $this->db->where('active', TRUE);
  $this->db->where('username', $this->input->post('username'));
  $this->db->where('pass1word', md5($this->input->post('password')));
  $query = $this->db->get('membership');
  if($query->num_rows == 1)
   return true;

function index(){
  $data['main_content'] = 'login_form';
  $this->load->view('includes/template', $data);
function validate_credentials()
  $query = $this->membership_model->validate();
   $data = array(
    'username' => $this->input->post('username'),
    'is_logged_in' => true

this is the form that gives nothing
<div id="login_form">
<h1>Login doode!</h1>
// this is just to keep info for a back button later.
&lt;?php $this->session->keep_flashdata('goback');
echo form_open('login/validate_credentials');

echo form_input(array(
  'name' => 'username',
  'id' => 'username',
  'value' => '',
  'placeholder' => 'Username'
echo form_password(array(
  'name' => 'password',
  'id' => 'password',
  'value' => '',
  'placeholder' => 'Password'
echo form_submit('submit', 'Login');

(goes to the controller again)

returns the info below.

I put the 1 into password to get this output in the browser. other wise i just get the username or password incorrect message.
SELECT * FROM (`membership`) WHERE `active` = 1 AND `username` = 0 AND `pass1word` = 'd41d8cd98f00b204e9800998ecf8427e'

[eluser]Abel A.[/eluser]
We're going to need a lot more details than that in order to help you.

yeah sorry still adding.

found it...

After 5 hours I find it 5 minutes after I post here..

There was an error i my .htaccess that made all post data f off. copied, the .htaccess file from another domain...


5hours wasted... damn I wish I was wasted..

Theme © iAndrew 2016 - Forum software by © MyBB