We're going to create two view files in this section, as follows:
/path/to/codeigniter/application/models/views/create/create.php
/path/to/codeigniter/application/models/views/nav/top_nav.php
Don't forget that the navigation file (views/nav/top_nav.php
) is unique to each chapter in this book.
The
create.php
file is the view file that the user creating the shortened URL will see; it contains the HTML form the user will enter the original URL into and any interactive elements such as error or success messages.
Create the create/create.php
view file and add the following code to it:
<div class="page-header"> <h1><?php echo $this->lang->line('system_system_name'); ?></h1> </div> <p><?php echo $this->lang->line('encode_instruction_1'); ?></p> <?php if (validation_errors()) : ?> <?php echo validation_errors(); ?> <...