Welcome Guest, Not a member yet? Register   Sign In
Select View

I removed the extra helpers... It doesnt like line 4 which is this-->
<?php foreach ($query->result() as $row): ?>

We did make some progress because I can now get to the view page..

This is what it says...

A PHP Error was encountered
Severity: Notice

Message: Undefined variable: query

Filename: views/contact_view.php

Line Number: 4

[eluser]Brandon Dickson[/eluser]
You need to put any values that you are passing to a view in an array or an object as CI extracts the array (or object properties) into the current scope when it loads the view.


$this->load->view('contact_view', $query);




Brandon and Stuffradio!!! Thank you so much man.. Here is what I did for my controller... Adding the query line at the end and changing the order of my curly bracet to close with two at the bottom made the difference.. My view works now..

class Contact extends Controller {
function contact()
$this->load->helper(array('form', 'url'));
$this->load->scaffolding( 'usercomment');
function index()
// Produces: SELECT * FROM mytable
$query = $this->db->get('usercomment');

This case is now closed...

Theme © iAndrew 2016 - Forum software by © MyBB