I have some problems with the email system for CodeIgniter:
First, the emails I send out (registration, confirmations) are getting caught in standard spam filters in gmail and other mail clients. How do I get around this? How do companies like Facebook get their emails through consistently?
Second, the mailer is working locally but o...
I am using Codeigniter to parse an uploaded csv file (which is a multi-dimensional array) into a database. I have tried everything to parse the comma values correctly, but the "id" column in mysql comes up short, as it reads "text", and not "text,text,text". Help!?
*For reference:*
print_r($data['csvData']);
Array ( [0] ...
I have a list of constants (I'm using them as an enum), some are define statements, and some are just global variables.
Where am I suppose to put them in the MVC framework so I can use them for both my model and my controller that needs to reference it?
I'd rather not stick it into config/constants.php since they shouldn't be called ex...
Hello,
This is a situation I have found myself in a few times and I just want clear it up once and for all.
Best just to show you what I need to do in some example code.
My Controller
function my_controller()
{
$id = $this->uri->segment(3);
$this->db->from('cue_sheets');
$this->db->where('id', $id);
$data['get_cue_sheets'] = $this-...
I have a list of items that the user can select. I want it to be more user friendly than standard checkboxes so I have seperate div's each with a unique id.
When user clicks an item, I use javascript to display a tick on top of that item and change the style to show that it is highlighted.
Im trying to work out how I can pass the list ...
So I thought this should be easy, but, I'm n00bing out here and failing epicly (as they say on teh interwebz).
So here's my code:
function xy() {
$array['var1'] = x;
$array['var2'] = y;
echo $this->_z;
}
function _z($array) {
$xy = $x.$y;
return $xy;
}
So, why doesn't that seemingly simple code work? I know with views you ...
Hi all!
I want to make an import script which allows users to upload their excel file (extension not important) to my php application. The application should reconize a list of items (so far so good). The difficulty in this case is that the excel files contain images...I've read information about phpexcel library but it does not say anyt...
In my view, I have:
$form_prop = 'class="inp_step" id="bedrooms"';
echo form_dropdown( "bedrooms", array( null, 0,1,2,3,4,5,6,7,8,9,10), null, $form_prop );
So how do I stick a
<?php echo $this->validation->set_select('myselect', 'one'); ?>
in there?
...
I'm using jWYSIWYG in a form I'm creating that posts to a database and was wondering how you can prevent a malicious user from trying to inject code in the frame?
Doesn't the editor need brackets (which I'd normally strip during the post process) in order to display styles?
...
using This Template Library
when i try and use the add_js() function it errors out. I add the regions $_scripts to the template header file but when i load the page it says undefined variable _scripts.
any thoughts?
changed <?= $_scripts ?> to <?= (isset($_scripts)) ? $_scripts : “”; ?>
and obviously i lose the error but the js file...
Hi,
I'm using the technique of saving codeigniter form validation rules to a config file as specified here, but can't seem to get it working.
I am also attempting to invoke validation callback functions from a Validation_Callbacks.php library which I'm autoloading via the autoload.php mechanism.
Below is a snippet from my form_validat...
How do you prevent malicious input in WYSIWYG editors like TinyMCE?
I have a system with users who are not "tech savvy" (so no WMD) and need a rich text editor that posts its content into a database.
I'm worried about scripting attacks and malicious input code.
...
Previously i installed CI in xampp. After that i installed wamp on for xampp but the project don't run accurately. It shows the following error->
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@localhost and infor...
Is there some kind of trick involved? Here's how I would envision it working:
1) User tries submitting the form
2) Event.observe captures this and sends an AJAX request to a special validation URL (PHP using Codeigniter)
3) If no errors were returned, continue submitting the original form
4) If errors were found, cancel form submiss...
I'm creating templates for outgoing emails and a view seems like the best place for the template. The model is doing the handling of the actual email. So I wanted to see if I'm breaking any convention.
...
I need to load controllers and models from a different folder than the default one. I am using a Linux system.
I am building a simple CI application for some people, for use on a shared hosting I own. But I want to give them access only to /views folder and some /config files. And this is why I need to store the controllers and models ...
Does anyone know any good 3rd party license based or open source search services (like Yahoo BOSS) that index and search through content?
I'm creating a niche job board in CodeIgniter and I'd rather not have my search be in PHP.
I'd like the service to be customizable enough to support refining content, and location based searching. ...
I have a main controller to handle the very front-end of my authentication system, it handles login, logout, update user info, etc. functions that I anticipate calling by POST'ing from views/forms. What about something like a "delete_user" function though? My thoughts are a button in someones admin panel would say "Delete Account" and it...
Sorry for the novice question!
I have a table called cities in which I have fields called id, name, xpos, ypos. I'm trying to use the data from each row to set a div's position and name.
What I'm wondering is what's the best practice for dynamically querying an unknown amount of rows (I don't know how many cities there might be, I wan...
I Need to integrate Surveys (any) with Codeigniter. Any one have any ideas or suggestion?
...