Okay, here are a couple of examples that will help put everything together.
Let's see how the process of creating a job advert exactly works:
The user visits the site and is presented with a list of jobs, a search box, and a navigation bar.
The user wishes to create a new job so they click on the Create link contained in the
views/nav/top_nav.php
file.CodeIgniter loads the
jobs
controller'screate()
function.The
create()
function displays the form in theviews/jobs/create.php
view file. There are three HTML dropdown form elements that allow the user to choose a job type, category, and location. These dropdowns are populated by theget_types()
,get_categories()
andget_locations()
functions ofJobs_model
, respectively.The user fills in the form and clicks on Go to submit the form.
The form is submitted to the
jobs
controller'screate()
function; it is validated and passed.The
jobs
controller'screate()
function sends the validated form input to...