Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
How to make custom submit button with css and Html::
  • Tell me please how to make code with tags in name (Value):
    <?php echo Form::submit('signup', '<span>Sign Up</span>',array('class'=>'button')); ?> I got: <input class="button" name="signup" value="<span>Sign Up</span>" id="form_signup" type="submit"> I want to make something like that, but without javascript code:
    <a href="#">Forgotten Password</a>
    <a class="button"><span>Login</span></a>
    And other question, When I clicked on login page I can see Page renedered in 0.1447s · Memory Usage 2.935MB 'packages' => array(
    'auth',
    ),
    And It is without cache code.
  • That looks very much like Html::anchor(), an anchor is not a form element, and certainly no submit button. And your other question is not a question. What do you want to know?
  • Harro Verton wrote on Saturday 24th of September 2011:
    That looks very much like Html::anchor(), an anchor is not a form element, and certainly no submit button. And your other question is not a question. What do you want to know?
    Sorry.
    I want to know it is normal if login page uses many memory? Memory Usage 2.968MB
    But page index (SQL Queries) - uses just 1.2MB
    if(Auth::check())
            &#123;
                Response::redirect('account');
            }
                $val =\Fuel\Core\Validation::factory('users');
                $val->add_field('username', 'Your username', 'required|min_length[3]|max_length[20]');
                $val->add_field('password', 'Your password', 'required|min_length[3]|max_length[20]');
            if($val->run())
            &#123;
                $auth = Auth::instance();
                if($auth->login($val->validated('username'),$val->validated('password')))
                &#123;
                    Session::set_flash('notice','FLASH: logged in');
                    Response::redirect('account');
                }else
                &#123;
                    $data['username'] = $val->validated('username');
                    $data['errors'] = 'Wrong username/password';
                }
            }else
            &#123;
                if($_POST)
                &#123;
                    $data['username'] = $val->validated('username');
                    $data['errors'] = 'Wrong username/password combo. Try again';
                }
                else
                &#123;
                    $data['errors'] = false;
                }
            }
            $this->template->errors = @$data['errors'];
            $this->template->content = \Fuel\Core\View::factory('account/login', $data);
    

Howdy, Stranger!

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

In this Discussion