[eluser]SpaceBiscuits[/eluser]
Hello, I am currently following a tutorial on youtube, about making a log in page. The problem is, *i think* the tutorial is based in php5 and I only have the php4 installed on my web hosting package. This may not be the problem but after hours of looking online, this is the only conclusion I can come to. The following is the page which handles the log in view.... I have also included a snippet of the validation code the controllers page.
Code:
<html>
<head>
</head>
<h1>Please Login</h1>
<p>Use the following form to login</p>
<div id="login_form">
<?php echo form_open('./admin/login'); ?>
<ul>
<li>
<lable>Username</lable>
<div>
<?php echo form_input(array('id' -> 'username', 'name', -> 'username')): ?>
</div>
</li>
<li>
<lable>Password</lable>
<div>
<?php echo form_input(array('id' -> 'password', 'name', -> 'password')): ?>
</li>
<li><?php echo validation_errors(); ?></li>
<li>
<?php echo form_submit(array('name' => 'submit'), 'Login'); ?>
</li>
</ul>
<?php echo form_close(); ?>
</div>
</body>
</html>
And
Code:
$this->form_validation->set_rules('username', 'Username', 'redirect|trim|max_length[50]|xxx_clean');
$this->form_validation->set_rules('password', 'Password', 'redirect|trim|max_length[200]|xxx_clean');
The error that I get is:-
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ')' in /home/califo53/public_html/CodeIgniterBlog/system/application/views/login_view.php on line 18
I hope I am posting this in the correct place, any help would be awesome!
Thanks