[eluser]dopple[/eluser]
Hi all. This is my first question on the board since starting to use codeigniter (about 2 or 3 weeks) so I reckon I'm doing pretty well so far.
The code below is outputting the html below that. Why is it all in one line? It's not a massive issue but I'd rather it was a bit more readable than that.
Code:
<?php
$attributes = array(
'class' => 'section',
'id' => 'section',
);
echo form_open('section/add_section',$attributes);
echo form_label('Section Name', 'name');
echo '<br />';
$data = array(
'name' => 'name',
'id' => 'name',
'maxlength' => '30',
'size' => '30',
);
echo form_input($data);
echo '<br />';
echo form_label('Remarks', 'remarks');
echo '<br />';
$data = array(
'name' => 'remarks',
'id' => 'remarks',
);
echo form_textarea($data);
echo '<br />';
echo form_submit('submit', 'Save');
echo '<br />';
echo form_close();
?>
Code:
<form action="http://localhost/helpr/index.php/section/add_section.php" method="post" class="section" id="section"><label for="name">Section Name</label><br /><input type="text" name="name" value="" id="name" maxlength="30" size="30" /><br /><label for="remarks">Remarks</label><br /><textarea name="remarks" cols="90" rows="12" id="remarks" ></textarea><br /><input type="submit" name="submit" value="Save" /><br /></form> </div>