So, I'm new to dynamic web design (my sites have been mostly static with some PHP), and I'm trying to learn the latest technologies in web development (which seems to be AJAX), and I was wondering, if you're transferring a lot of data, is it better to construct the page on the server and "push" it to the user, or is it better to "pull" t...
Hi everyone im new to a PHP framework codeIgniter, I am going over the user guide iv ran in to a problem, I am on the part where you load helper file but for some reason my code just isnt working I keep getting this error:
Fatal error: Call to undefined function anchor() in /home/fresherd/public_html/CI/system/application/views/blogview...
I'm running a query that looks like this:
$results = $DB2->query("SELECT COUNT(*) FROM auth_user as count WHERE email='" . $DB2->escape_str($email) . "';");
It's returning an object that looks like this:
DB_Cache Object
(
[result] => Array
(
[0] => Array
(
[COUNT(*)] => 0
)
)
...
Fatal error: Call to a member function result() on a non-object in C:\wamp\www\system\application\models\users_model.php on line 8
<?php
class Users_model extends Model {
function get_records()
{
$query = $this->db->get('users');
return $query->result();
}
}
?>
...
Trying a bit of AJAX, and I find that much of my data is littered with underscores!
Documentation confirms that this is working as intended. Any way to pass my form information to PHP intact? I'm using CodeIgniter, so my pass looks like /controller/function/variable,
receiving controller:
controller{
function($v=0){#what once was he...
If I would like to have several static methods in my models so I can say User::get_registered_users() and have it do something like
public static function get_registered_users()
{
$sql = "SELECT * FROM `users` WHERE `is_registered` = 0";
$this->db->query($sql);
// etc...
}
Is it possible to access the $this->db object or c...
Ok, I'm trying to validate a form in codeigniter
as a first step I want to make all fields in my form required to make an entry...
but I can't make it work
here is the code:
myBlog.php
<?php
class MyBlog extends Controller{
function MyBlog(){
parent::Controller();
$this->load->helper('url'); //...
I have developed a simple site that fetches tweets from the Twitter public timeline, caches them for 60 seconds and so on. I have recently moved hosts from Hostgator to Mediatemple and my site was previously working fine on Hostgator.
My application doesn't use a database connection, nor does it use any form of flat-file database either...
Hello Guys,
i'm new with Codeigniter,and whish to know if i can access any kind of iterator for the foreach with {}-Notation in my views.
The thing is, i'm having a list which should be devided after each x items.
example (what i would like to do:
<ul>
{list}
<li>{items}</li>
<? if ($iterator % 15 == 0) echo "</ul><ul>"; ?>
{...
Hi,
I'm trying to send emails through localhost (XAMPP Windows 1.7.3 installation), but I've been trying for hours with no success.
This is the last code I tried:
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.gmail.com',
'smtp_port' => 465,
'smtp_user' => '[email protected]',
...
Is there an open source threaded messaging library for CodeIgniter? Or is it best to create the system in house?
I'm looking for a private messaging system with the basic person to person interactions, reply, attach etc.
...
I can't work this out. One minute it was working fine and now it's not and I can't see what's changed!!
My problem is simply submitting a username and password for a login function. The form method is set to "post" but for some reason no data is getting through. If I dump $_REQUEST or $_POST they return empty.
I know the form is submitti...
Good morning!
I'm having great success so far with CodeIgniter. I'm new to PHP and web development in general, but I feel that CodeIgniter is giving me a leg up while I catch up on the basics.
My question for today is this - I have been happily loading config and lang values from my views for a while now, and everything is working fine...
Hi, I'm using Doctrine with Codeigniter, I defined my ratings column as $this->hasColumn('ratings','array', 1000);. I'm using
$res = Doctrine::getTable('Resource')->find($resource_id);
$res->ratings = $rating;
$res->save();
but only the $rating gets inserted, overwriting the last value, I want to store the ratings as an...
I have a dropdown labeled "amenities[]" and it's an array. When I use CodeIgniter's form_validation, I want to re-populate it properly using set_value, but I'm not able to. Anyone have any input on this?
...
Hi,
I'm coding in PHP w/ CodeIgniter and I'd like to test some of the features in my app that send emails.
For some reason, I couldn't send emails through my email account in my local server (XAMPP), and I also don't want some SPAM filter to think I'm spamming while I'm testing.
So is there any email service that I can use for testin...
I need it so that when i type in domain.com/user/1 the one gets pulled in as a variable and then can be used to get the correct database values. Right now the variable is set manually with domain.com/user . How do I setup the segments and then make get() that number. I'm working only with username url's as numbers so no, names just domai...
Hi. I'm trying to use the Haughin library to create a favorite on Twitter. I'm able to login with oauth, get my info, update my status, but the favorite call won't work. I think it's a little outdated for that function, any body made it work?
Here's the library :
http://www.haughin.com/code/twitter/
...
I'm new to Codeigniter and I'm trying to develop a simple website with a couple of pages. Under my "Work" view I have it looping through the database I've set up:
<div id="content">
<?php foreach ($records as $row){?>
<div class="item">
<p class="num"><?php echo $row->id;?></p>
<h2><?php echo $row->title;?></h2>
<p><?php ec...
I know that CodeIgniter already elegantly handles URL's. What I have is a form with multiple elements (date, keyword, location = optional). Is it possible to set up CI to create a URL that looks like:
mysite.com/class/function/date/keyword?
...