Forgive me if I could have any sort of fundamental error here. I'd imagine there's something simple I'm missing. I'm looking to store Twitter updates in a database with only a few fields: an auto-increment index, the time posted, the actual status update & the user id the update is in reply to.
I'm simply storing this last field so I ca...
I have the following model functions with PHP.
I know I am repeating myself.
Is there anyway I can simplify this code?
function getTopMenus(){
$data[0] = 'root';
$this->db->where('parentid',0);
$Q = $this->db->get('menus');
if ($Q->num_rows() > 0){
foreach ($Q->result_array() as $row){
$data[$row['i...
I have a strange problem that I am unable to track down. I am using Codeigniter and Jquery to create an ajax search feature.
Everything is working well and the correct data is been returned from my model but when I load the view from the controller it has the header of the page in the response.
I have tried an empty view to load and st...
Can someone teach me how to embed a flash MP3 player (step-by-step) using codeigniter? I have been trying for hours now with no success. I am so frustrated. Someone please help me. Thanks.
...
So I'm writing a script in codeigniter, and I get the following error message:
Parse error: syntax error, unexpected T_STRING in /home/globalar/public_html/givinghusband.com/system/application/controllers/sizes.php on line 1
the only problem: the only thing on that line is this:
<?php
So I'm quite mysterified as to what's going on ...
So I had an issue last night when I went to upload a project I've been working on locally to my server.
I had this:
require_once "/../controllers/source/MySpaceID/myspace.php";
Which is the correct path to that file finding its way out of the libraries folder. It worked fine until I put it on the server. Any thoughts?
...
I posted on the Carabiner wiki but wanted to see if anyone here was able to get Carabiner for CI cache working, no matter what i try it will not write the cache to the folder, and I gave the folder 777 permissions. Has anyone else had this issue?
...
Hello,
I am looking to build a one page website, that runs on PHP(obviously using codeigniter) and AJAX(supported by jquery), at the moment I have a menu that gets populated from the database, depening on what catergories are selected as being on line, the then build a an url using those results,
if(isset($main_menu)) {
foreac...
Hello,
I have a website where I am wanting to get some query results through AJAX and JSON, but I have absolutely no idea how to do it, I have this function,
public function category() {
$table = $this->uri->segment(2);
$content_id = $this->uri->segment(3);
$data['content'] = $this->site_model->get_content($tabl...
I'm planning an application that allow users to create a specific type of website. I wanted to link account names to 'account.myapp.com'. Going to 'account.myapp.com' will serve up a website. I haven't a clue on how to map this. I'll be using Code Igniter as my development tool.
I would like to give users the ability to add a registered...
How to get records from Excel sheet to Mysql database using Codeigniter php?
...
Hello,
I have a method in codeigniter that looks like this,
public function category() {
//$this->output->enable_profiler(TRUE);
//echo "Hello function called by ajax";
$table = $this->uri->segment(3);
$content_id = $this->uri->segment(4);
$data['content'] = $this->site_model->get_content($table, $content_id);
$this->load...
I have a rough program sketched thusly:
if (condition){
//redirect to some page
}
else{
echo $some_var;
}
So when I test is and the condition is true, it does the redirect, but also throws notices that there are undefined variables $some_var (that are pulled from a DB and WON'T be defined if the condition is true).
So does the cod...
I'm writing my first Codeigniter web app, and I'd like to use AJAX to pull some info for a modal box. Can somebody guide me through an easy way to incorporate ajax w/ CI?
Specifically, the user will click on a link, and instead of being taken to another page, that page will be loaded into a modal box.
Thanks!
...
Hi,
I am currently building a website in codeigniter that is based around the idea of being a one page, site, I currently have a main view that looks like this,
<?php
$this->load->view('template/main_menu.php');
$this->load->view('template/left-content.php');
$this->load->view('template/right-content.php');
?>
In the ri...
I need to change $config['uri_protocol'] from AUTO to PATH_INFO (to allow url parameters)
My problem: when I set $config['uri_protocol']="PATH_INFO"; the regular urls stop functioning and I get the homepage no matter which site page URL I click.
print_r ($_SERVER) shows that url parameters I add appear only in REQUEST_URI an not in an...
Hi, I'm developing a REST CodeIgniter Controller and need to POST and PUT to a URL in multiple formats.
The main formats I can think of would be:
XML
JSON
HTML Form data
There will be a response format defined in the URI e.g. /format/xml or /format/csv.
I don't want to have to define the request format in the URI as well.
I was w...
Hi,
I have a website with some AJAX on it, basically the users clicks on a link, and some AJAX goes and fires a method that returns some HTML as show below, as the title says the data that is returned does not seem to be going into the HTML, is this why my accordions are not being made? It is strange becuase results are being returned ...
I have the following URL
domain.com/name/details/12345
I want it so if someone types in
domain.com/name/12345 it goes to the above
I am using $route[‘name/details/(:num)’] = ‘name/’;
But I get a 404 error when I try it, Any ideas?
...
I'm writing some custom helpers in Codeigniter and I want to call some functions from other helper files like date, etc, in my helper. I keep getting "call to undefined function" errors. How can I reference other helper functions from my helper?
Thx
D
...