As well as adding for the P tag I added the use of style and Id to the html helper functions.Its simple and very usefull :) I know of course this isn't in your style
Ps what a beautiful piece of coding. (minus your terrifying use of shorttags! ;) Thank you.
Hey all. I’m just starting out with Codeigniter and so far I really like it.
Anyways, here’s my question. I have three tables: athletes, guardians, and xref_athgrd.
The athletes table hold athletes, the guardians table holds guardians and the xref tables holds the cross reference so that I can have a many to many relationship. Essentially one athlete can have many guardians, one guardian can have many athletes.
So I want to create a view that will display the athlete in one row, followed by any guardians the athlete has directly below it in other rows. I’ve been racking my brain for at least two days now and I can’t seem to figure out how to do it. The best I’ve been able to come up with in my brain is that I need to somehow create in the controller an array or object that will hold all the possibilities prior to sending it to the view.
This is how I’d like it to look:
Id Name
05 Ima Athlete01
Athletes MomGuardian01 555-555-5555 emailmom@email.com
Ahtletes DadGuardian02 555-553-5353 emaildad@emailcom
06 Mee Athletealso
Mees Momguaridan 444-444-4444 meesmomshot@email.com
Mees Dadsimpotent 444-333-4343 dadneedsviagra@email.com
hi all i’m trying to build up my simple personal request_helper just to verify if requests
isPost() or isGet() or isAjax()
i named my helper as request_helper and i load it by default in the autoload class.
i’m trying coding it so:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
function isGet($_GET) { if($_GET) { return isset($_GET); } } function isPost($_POST) { if($_POST) { return isset($_POST); } } function isAjax($_SERVER) { if($_SERVER['HTTP_X_REQUESTED_WITH']) { return isset($_SERVER['HTTP_X_REQUESTED_WITH']) == 'XMLHttpRequest'; } }
when i make
if($this->request->isPost()) { echo 'yes is post'; }
the result is
Call to a member function isPost() on a non-object