Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Why can't I have nothing in input's $value parameter passing it in view?
  • generating form:
    <?php
    echo Form::open(array('action' => '', 'method' => 'post'));
    echo Form::csrf();
    echo "Name:";
    echo Form::input('name', '', array('style' => 'border: 2px solid yellowgreen;'));
    echo "<br />";
    echo "<br />";
    echo "Pass:";
    echo Form::password('pass', '', array('style' => 'border: 2px solid yellowgreen;'));
    echo "<br />";
    echo "<br />";
    echo Form::submit('', 'Login');
    echo Form::close();
    ?>
    getting information through Controller:
        public function post_index()
        {
            $a = Input::post();
            echo "<pre>".print_r($a, true)."</pre>";
            die();
        }
    When I passed the information through post action, I got in my view: Why is this happening?
    Array
    (
    [fuel_csrf_token] => 5ac0b42b6e34a20dfc103096015e626b1a9a4f3eed117c935d2ef6dcd253ea1255570bbd91a76fff98cc63e8a41fc28793d193398a7780756e1e5550061446b8
    [name] => localhost
    [pass] => password
    )

    [pass] => i got one of my main passwords that I use anywhere when I register in websites
    I want to get this:
    Array
    (
    [fuel_csrf_token] => 5ac0b42b6e34a20dfc103096015e626b1a9a4f3eed117c935d2ef6dcd253ea1255570bbd91a76fff98cc63e8a41fc28793d193398a7780756e1e5550061446b8
    [name] => ''
    [pass] => ''
    )

    name=pass=""=nothing

    This is not a problem but I am wondering why.



  • I don't know. Maybe your browser did an auto-fill of the fields?

    I don't think your code, or Fuel, is capable of knowing what password you use for other sites.
  • It is very strange, I will check.
  • It is in my cookie. I noticed when I loaded the webpage on chrome. I had opened it before on firefox.
  • Fuel doesn't put anything in cookies, and cookies are not shared between different browsers. And data in cookies (how do you know?) is not automatically put in a form.
  • I am wrong. I deleted firefox's cach too but I don't understand why is this continuing to happen? On chrome I don't have this but on firefox.......................... How to prevent auto-fill of the fields if this is the real problem in firefox?
  • I am an idiot, this is happening because firefox saved my password for the whole localhost :DThank you.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion