0

Take note this was just done for the sake of experimentation to headstart my journey in CodeIgniter. :D

Hello Stackoverflow. Why is it that my page only echoes the username of the given inputs? Could you please tell me on what part did I screw up??

<?php


$data = array(
                'name'        => 'username',
              'id'          => 'username',
                );
$data2 = array(
                'name' >= 'pw',
                'value' >= ''
    );

$data3 = array(
                'value'        => 'Submit',
                'type' >=  'submit'
                );


echo form_open();
echo form_input($data);
echo form_password($data2);
echo form_submit($data3);
echo form_close();



$hello  = $this->input->post('username');
$hello2  = $this->input->post('pw');
if(isset($hello))
{
echo $hello. " ". $hello2;
}
2
Contributors
1
Reply
14
Views
4 Years
Discussion Span
Last Post by cereal
0

Inside $data2 change:

'name' >= 'pw',

to:

'name' => 'pw',

The same goes for value in the same array and type in $data3. By the way, this is Daniweb not SO.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.