Search Results

Search found 981 results on 40 pages for 'codeigniter'.

Page 24/40 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • Accessing Text Input Field Data

    - by 01010011
    Hi, Using CodeIgniter, how do I access and display text entered into an input field on a view file (see code below) from my controller file? // input_view.php $input_data = array('name' => 'search_field', 'size' => '70'); echo form_input($input_data);

    Read the article

  • CodeIgnitor Error 403 Access forbidden

    - by 01010011
    Hi, I extracted CodeIgnitor to XAMPP's htdocs and when I tried to access index.php like this: h t t p://127.0.0.1/ci/index.php I get the following error message: Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server. Error 403...... How can I troubleshoot this problem?

    Read the article

  • 403 error with codeignitor

    - by DJB
    When I type in the standard web address for my site, I get a 403 error. However, when I type in a more exact address, say pointing to an index.php file, everything shows up fine. I'm using Anodyne Productions' Nova (SMS 3) which uses codeignitor. All accompanying software (PHP/MySQL) is compatible. I'm not a very technical person, so I'm hoping that this is an easy fix. Thanks for taking the time to answer.

    Read the article

  • Creating a user-defined code generation system in PHP

    - by user270766
    My newest project that I'm looking to build with CodeIgniter would require some sort of system that would allow a user to drag and drop pre-defined functions/methods into mini-classes/objects and then run/test them in the browser. So it'd something similar to Scratch. I've designed a relational database that I think could work for this (storing the function names and have these classes "subscribe" to those functions) - but I'm wondering whether or not to go ahead with it. Is there a better way to do this or is there a system out there that would accomplish this for me? EDIT: It would have to be extremely simple for an end user, but hopefully be flexible enough to easily add more complex functionality in the future.

    Read the article

  • Convert old NuSoap code into PHP core soap functions

    - by Enrique
    Hi I've been testing nuSoap with codeIgniter (PHP Framework) but seems nuSoap isn't prepared to work with latest php 5.3, even if I download a patched nusoap version for php 5.3 I have the following code: require_once(APPPATH.'libraries/NuSOAP/lib/nusoap'.EXT); //includes nusoap $n_params = array('CityName' => 'San Juan', 'CountryName' => 'Argentina'); $client = new nusoap_client('http://www.webservicex.net/globalweather.asmx?WSDL'); $client->setHTTPProxy("10.2.0.1",6588,"",""); $result = $client->call('GetWeather', $n_params); Can any1 help me to convert these functions into php soap functions? Including proxy function? Thanks a lot

    Read the article

  • Cassandra or mysql 5

    - by saturngod
    Should I use cassandra in 100,000 users project ? In mysql 5 have full text search and partition table. I'm starting to make Question and answer system like stackoverflow with CodeIgniter. It's move from vbulletin to new system. In old vbulletin have around 100,000 users and total post is around 80,000. In next 3 or 4 year, users and posts will be more and more. So, Should I use cassandra instead of mysql 5 ? If I use cassandra, I need to change gridserver in mediatemple to DV server in mediatemple. Cassandra is not built in hosting system. So, I must use VPS or DV server. If I use mysql 5, hosting is not problem but how about speed and search. Btw, What database using in Stack Over ?

    Read the article

  • apache mod_rewrite rule in httpd.conf for modifying some paths, but not others

    - by wallyk
    I'm having quite a challenge creating an appropriate rewrite rule for Apache/2.2.14 on Fedora 10. I'm working through the CodeIgniter-Doctrine tutorial which uses an .htaccess file. (Search for Removing “index.php” from CodeIgniter urls about 10% down.) But since that's not recommended for a production server, I'm trying to tweak it to work in /etc/httpd/conf/httpd.conf. <VirtualHost *:80> ServerName ci_doctrine DocumentRoot /var/www/html/ci_doctrine ErrorLog /var/log/httpd/cid-error_log CustomLog /var/log/httpd/cid-access_log common <IfModule mod_rewrite.c> RewriteEngine on RewriteLog /var/log/httpd/cid_rewrite RewriteLogLevel 9 # RewriteCond ^/css/style.css$ (these have bad syntax, but that's beside the point) # RewriteRule ^/css/style.css$ /css/style.css [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L] </IfModule> <IfModule !mod_rewrite.c> ErrorDocument 404 /ci_doctrine/index.php </IfModule> </VirtualHost> It seems like the tutorial .htaccess rules properly test for existing files and then not alter the URL in such cases, but the rewrite log says that the conditions are true (that is, the file does not exist) even though it's there. 127.0.0.1 - - [03/May/2010:23:26:56 --0700] [ci_doctrine/sid#13c1868][rid#167e8e0/initial] (2) init rewrite engine with requested uri /login 127.0.0.1 - - [03/May/2010:23:26:56 --0700] [ci_doctrine/sid#13c1868][rid#167e8e0/initial] (3) applying pattern '^(.*)$' to uri '/login' 127.0.0.1 - - [03/May/2010:23:26:56 --0700] [ci_doctrine/sid#13c1868][rid#167e8e0/initial] (4) RewriteCond: input='/login' pattern='!-f' => matched 127.0.0.1 - - [03/May/2010:23:26:56 --0700] [ci_doctrine/sid#13c1868][rid#167e8e0/initial] (4) RewriteCond: input='/login' pattern='!-d' => matched 127.0.0.1 - - [03/May/2010:23:26:56 --0700] [ci_doctrine/sid#13c1868][rid#167e8e0/initial] (2) rewrite '/login' -> '/index.php//login' 127.0.0.1 - - [03/May/2010:23:26:56 --0700] [ci_doctrine/sid#13c1868][rid#167e8e0/initial] (2) local path result: /index.php//login 127.0.0.1 - - [03/May/2010:23:26:56 --0700] [ci_doctrine/sid#13c1868][rid#167e8e0/initial] (2) prefixed with document_root to /var/www/html/ci_doctrine/index.php/login 127.0.0.1 - - [03/May/2010:23:26:56 --0700] [ci_doctrine/sid#13c1868][rid#167e8e0/initial] (1) go-ahead with /var/www/html/ci_doctrine/index.php/login [OK] 127.0.0.1 - - [03/May/2010:23:26:56 --0700] [ci_doctrine/sid#13c1868][rid#16848f8/subreq] (2) init rewrite engine with requested uri /login 127.0.0.1 - - [03/May/2010:23:26:56 --0700] [ci_doctrine/sid#13c1868][rid#16848f8/subreq] (3) applying pattern '^(.*)$' to uri '/login' 127.0.0.1 - - [03/May/2010:23:26:56 --0700] [ci_doctrine/sid#13c1868][rid#16848f8/subreq] (4) RewriteCond: input='/login' pattern='!-f' => matched 127.0.0.1 - - [03/May/2010:23:26:56 --0700] [ci_doctrine/sid#13c1868][rid#16848f8/subreq] (4) RewriteCond: input='/login' pattern='!-d' => matched 127.0.0.1 - - [03/May/2010:23:26:56 --0700] [ci_doctrine/sid#13c1868][rid#16848f8/subreq] (2) rewrite '/login' -> '/index.php//login' 127.0.0.1 - - [03/May/2010:23:26:56 --0700] [ci_doctrine/sid#13c1868][rid#16848f8/subreq] (2) local path result: /index.php//login 127.0.0.1 - - [03/May/2010:23:26:56 --0700] [ci_doctrine/sid#13c1868][rid#16848f8/subreq] (2) prefixed with document_root to /var/www/html/ci_doctrine/index.php/login 127.0.0.1 - - [03/May/2010:23:26:56 --0700] [ci_doctrine/sid#13c1868][rid#16848f8/subreq] (1) go-ahead with /var/www/html/ci_doctrine/index.php/login [OK] 127.0.0.1 - - [03/May/2010:23:26:58 --0700] [ci_doctrine/sid#13c1868][rid#167e8e0/initial] (2) init rewrite engine with requested uri /css/style.css 127.0.0.1 - - [03/May/2010:23:26:58 --0700] [ci_doctrine/sid#13c1868][rid#167e8e0/initial] (3) applying pattern '^(.*)$' to uri '/css/style.css' 127.0.0.1 - - [03/May/2010:23:26:58 --0700] [ci_doctrine/sid#13c1868][rid#167e8e0/initial] (4) RewriteCond: input='/css/style.css' pattern='!-f' => matched 127.0.0.1 - - [03/May/2010:23:26:58 --0700] [ci_doctrine/sid#13c1868][rid#167e8e0/initial] (4) RewriteCond: input='/css/style.css' pattern='!-d' => matched 127.0.0.1 - - [03/May/2010:23:26:58 --0700] [ci_doctrine/sid#13c1868][rid#167e8e0/initial] (2) rewrite '/css/style.css' -> '/index.php//css/style.css' 127.0.0.1 - - [03/May/2010:23:26:58 --0700] [ci_doctrine/sid#13c1868][rid#167e8e0/initial] (2) local path result: /index.php//css/style.css 127.0.0.1 - - [03/May/2010:23:26:58 --0700] [ci_doctrine/sid#13c1868][rid#167e8e0/initial] (2) prefixed with document_root to /var/www/html/ci_doctrine/index.php/css/style.css 127.0.0.1 - - [03/May/2010:23:26:58 --0700] [ci_doctrine/sid#13c1868][rid#167e8e0/initial] (1) go-ahead with /var/www/html/ci_doctrine/index.php/css/style.css [OK] 127.0.0.1 - - [03/May/2010:23:26:58 --0700] [ci_doctrine/sid#13c1868][rid#16848f8/subreq] (2) init rewrite engine with requested uri /css/style.css 127.0.0.1 - - [03/May/2010:23:26:58 --0700] [ci_doctrine/sid#13c1868][rid#16848f8/subreq] (3) applying pattern '^(.*)$' to uri '/css/style.css' 127.0.0.1 - - [03/May/2010:23:26:58 --0700] [ci_doctrine/sid#13c1868][rid#16848f8/subreq] (4) RewriteCond: input='/css/style.css' pattern='!-f' => matched 127.0.0.1 - - [03/May/2010:23:26:58 --0700] [ci_doctrine/sid#13c1868][rid#16848f8/subreq] (4) RewriteCond: input='/css/style.css' pattern='!-d' => matched 127.0.0.1 - - [03/May/2010:23:26:58 --0700] [ci_doctrine/sid#13c1868][rid#16848f8/subreq] (2) rewrite '/css/style.css' -> '/index.php//css/style.css' 127.0.0.1 - - [03/May/2010:23:26:58 --0700] [ci_doctrine/sid#13c1868][rid#16848f8/subreq] (2) local path result: /index.php//css/style.css 127.0.0.1 - - [03/May/2010:23:26:58 --0700] [ci_doctrine/sid#13c1868][rid#16848f8/subreq] (2) prefixed with document_root to /var/www/html/ci_doctrine/index.php/css/style.css 127.0.0.1 - - [03/May/2010:23:26:58 --0700] [ci_doctrine/sid#13c1868][rid#16848f8/subreq] (1) go-ahead with /var/www/html/ci_doctrine/index.php/css/style.css [OK] The file .../css/style.css was working properly before I started messing around with the rewrite rules, so it should be in the right place. But now the path is always munged up by the rewriting, though the virtual components below index.php are properly translated. What am I doing wrong?

    Read the article

  • If/else isn't working properly

    - by luckytaxi
    I have a validation function I'm using inside of codeigniter. function valid_image() { if ( ($_FILES["file"]["type"] != "image/jpeg") || ($_FILES["file"]["type"] != "image/gif") ) { $this->form_validation->set_message('valid_image', 'Wrong file type..'); return false; } else { return true; } With just the "image/jpeg" part in the if statement it works fine. If I try to upload anything other than a jpg file it fails. If I run the code above, it fails with both a jpg or a gif file. And before someone says "why not use the upload class," I can't. I'm saving my pics directly into MongoDB, so the upload class doesn't help much.

    Read the article

  • How to send to view $data and $data2 at same time?

    - by artmania
    Hi friends, I use codeigniter and issue about how to send to view $data and $data_cat2 at same time? $data['records'] = $this->gallery_model->get_all(1); $data_cat2['records'] = $this->gallery_model->get_all(2); $this->load->view('gallery/index.php',$data); I tried to put an another load-view for $data_cat2. and it just repeated the all page :/ Thanks regards!!! appreciate helps! sorry for silly question, just sorted it! feel shame to ask that: $data['records'] = $this->gallery_model->get_all(1); $data['records_cat2'] = $this->gallery_model->get_all(2); and using the record_cat2 in view file.

    Read the article

  • How do I format an email for Gmail?

    - by Ethan
    Hey, I'm sending out an email using codeigniter's built in library. All I'm trying to do is send a bolded string, but instead of rendering the tags, it is printing them. What I have: <html> <head> </head> <body> <b>Donkey</b> </body> </html> That is, character for character, the email I'm getting. Why aren't the tags rendering? Thanks for your help!

    Read the article

  • Hide segment in URL but give code access to hidden segment

    - by Brandon Durham
    I'm using Structure and have a "Supernav" page with multiple children that will make up the supernav for the site. I thought this would be a nice way to have all pages on the site accessible to the client via one location: the Structure UI. If you visit any of the child pages in the "supernav" group the URL comes out like this: http://website.com/supernav/prospective-students I'd love to be able to remove the supernav segment of those URLs so that it ends up being: http://website.com/prospective-students I don't even want the supernav segment to appear in the status bar when you hover over these links on the page. Is this possible? With CodeIgniter this comes down to a simple routing rule, but I don't know if that's an option with EE. Appreciate any help I can get!

    Read the article

  • MVC best practice

    - by Patrick
    I'm new to MVC (i'm using codeigniter) and was wondering where I should put a "cut_description" function. My model retrieves a list of events including their description. If the description is too long, I would need to cut it after the first n words, and add a "read more" link, so the view doesn't get too cluttered. What would be the best practice? a) add the logic to cut after n words to the model; b) add the logic to the controller; c) add it to the view? I think C would be the easier (I have to loop through results anyway), but I'm not sure this would comply with MVC. What do you think?

    Read the article

  • A controller problem using a base CRUD model

    - by rkj
    In CodeIgniter I'm using a base CRUD My_model, but I have this small problem in my browse-controller.. My $data['posts'] gets all posts from the table called "posts". Though the author in that table is just a user_id, which is why I need to use my "getusername" function (gets the username from a ID - the ID) to grab the username from the users table. Though I don't know how to proceed from here, since it is not just one post. Therefore I need the username to either be a part of the $data['posts'] array or some other smart solution. Anyone who can help me out? function index() { $this->load->model('browse_model'); $data['posts'] = $this->browse_model->get_all(); $data['user'] = $this->browse_model->getusername(XX); $this->load->view('header'); $this->load->view('browse/index', $data); $this->load->view('footer'); }

    Read the article

  • Security precautions and techniques for a User-submitted Code Demo Area

    - by Jack W-H
    Hey folks Maybe this isn't really feasible. But basically, I've been developing a snippet-sharing website and I would like it to have a 'live demo area'. For example, you're browsing some snippets and click the Demo button. A new window pops up which executes the web code. I understand there are a gazillion security risks involved in doing this - XSS, tags, nasty malware/drive by downloads, pr0n, etc. etc. etc. The community would be able to flag submissions that are blatantly naughty but obviously some would go undetected (and, in many cases, someone would have to fall victim to discover whatever nasty thing was submitted). So I need to know: What should I do - security wise - to make sure that users can submit code, but that nothing malicious can be run - or executed offsite, etc? For your information my site is powered by PHP using CodeIgniter. Jack

    Read the article

  • Login code sample which has been hacked via SQL Injection, although mysql_real_escape_string...

    - by artmania
    Hi friends, I use CodeIgniter, and having trouble with hacking :( is it possible to make SQL Injection to the login code below: function process_login() { $username = mysql_real_escape_string($this->input->post('username')); $password = mysql_real_escape_string(MD5($this->input->post('password'))); //Check user table $query = $this->db->getwhere('users', array('username'=>$username, 'password'=>$password)); if ($query->num_rows() > 0) { // success login data Am I using the mysql_real_escape_string wrong? or what? Appreciate helps!

    Read the article

  • embed multiple youtube videos to chromeless player cue

    - by Quaze
    So in the project ive been working on i use the youtube API to add a video to a chromeless player (got custom buttons, everything works no problems). It loads the youtube id which it gets from the database (Codeigniter, PHP). But what i would like to see is: instead of loading 1 video, id like to add all the videos i get from the database in the cue of that one player. So only one screen, first video retrieved from dbase gets played first, when its done second get loaded preferably also looped. Is there any way i can achieve this? My first guess would be to save the array with youtube id's somewhere and on state change (when the 'video stop'-event gets fired) load the next id from the array. Havent tried this yet because id prefer if the cue gets just gets filled on the init, so it doesnt have to load after a video has been ended. Is This possible?

    Read the article

  • Very strange form behaviour

    - by musoNic80
    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 submitting because if I change the method to "get" I receive the data as expected. Can anyone think of any reason why "get" would work when "post" isn't?!?!? If it's relevant, I'm using the codeigniter framework.

    Read the article

  • jQuery not refreshing tabs content in IE

    - by iddimu
    Hi all! I have a page that is using jQuery tabs. Within one of my tabs I have a div that contains a form (initially hidden) that I want to use to add content to the tab. What I have works perfectly in Chrome, Firefox, and Safari. But, in IE 7 the tab will not refresh. The post works and the data gets added to the database, but it simply will not show the new content after submitting it. I don't think it matters - but, just for information I am using the Codeigniter PHP framework as well. Here is my javascript: <script type="text/javascript"> $(document).ready(function(){ // initialize the addChild form as hidden until user requests it open $('#addChild').hide(); // open the form $('#openDialog').click( function(){ $('#addChild').slideToggle(); return false; }); // close the form $('#closeDialog').click( function(){ $('#addChild').slideToggle(); return false; }); // submit the form $('#frmAddChild').submit( function(){ $('#addChild').slideToggle(); $.ajax({ url: '/children/add', type: 'POST', data: $('#frmAddChild').serialize() //cache: false }); //reload the children tab $('#tabs').tabs('load',3); return false; }); }); </script> And, here is my PHP/HTML: <?php // initialize the elements of the form $frmAddChild = array( 'name' => 'frmAddChild', 'id' => 'frmAddChild', 'method' => 'post' ); $child_name = array( 'name' => 'child_name', 'id' => 'child_name', ); $child_dob = array( 'name' => 'child_dob', 'id' => 'child_dob' ); $btnOpenDialog = array( 'name' => 'openDialog', 'id' => 'openDialog', 'value' => 'true', 'content' => 'Add Child' ); $btnCloseDialog = array( 'name' => 'closeDialog', 'id' => 'closeDialog', 'value' => 'true', 'content' => 'Cancel' ); // button that shows the drop down to add echo form_button($btnOpenDialog); ?> <div id="addChild" title="Add Child"> <?php echo form_open('children/add/',$frmAddChild); ?> <table> <tr> <td> <?php echo form_label('Child\'s Name', 'child_name'); ?>: </td> <td> <?php echo form_input($child_name); ?> </td> </tr> <tr> <td> <?php echo form_label('Date of Birth','child_dob'); ?>: </td> <td> <?php echo form_input($child_dob); ?> </td> </tr> <tr> <td colspan="2" align="right"> <?php echo form_submit('submit', 'Add'); ?> <?php echo form_button($btnCloseDialog); ?> </td> </tr> </table> <?php echo form_close(); ?> </div> Does anyone have any ideas how I can get this working correctly in IE? Also, if anyone has any comments about how I have things structured, please let me know. I'm new to Codeigniter and I am by no means a javascript or jQuery expert. Thanks for your help!

    Read the article

  • Permanently write variables to a php file with php

    - by Oliver
    I need to be able to permanently change variables in a php file using php. I am creating a multilanguage site using codeigniter and using the language helper which stores the text in php files in variables in this format: $lang['title'] = "Stuff"; I've been able to access the plain text of the files using fopen() etc and I it seems that I could probably locate the areas I want to edit with with regular expressions and rewrite the file once I've made the changes but it seems a bit hacky. Is there any easy way to edit these variables permanently using php? Cheers

    Read the article

  • Paypal Payflow pro library

    - by John Stewart
    I already have an express checkout integrated with my Codeigniter application. Now I want to integrate seamless paypal where I collect the CC information and pass it to Paypal (via backend) and once everything is approved, my application shows that to the user. All this with out ever going to Paypal's website. I know that Paypal gives a bunch of sample code but they have so many different products that advertise to do the same thing. Is there any wrapper library in PHP that I can use for handling all this? What sort of design decision is involved in migrating to such system? Would I need SSL certificates for this?

    Read the article

  • Can I do this with just SQL?

    - by Josh
    At the moment I have two tables, products and options. Products contains id title description Options contains id product_id sku title Sample data may be: Products id: 1 title: 'test' description: 'my description' Options id: 1 product_id: 1 sku: 1001 title: 'red' id: 2 product_id: 1 sku: 1002 title: 'blue' I need to display each item, with each different option. At the moment, I select the rows in products and iterate through them, and for each one select the appropriate rows from options. I then create an array, similar to: [product_title] = 'test'; [description] = 'my description'; [options][] = 1, 1001, 'red'; [options][] = 2, 1002, 'blue'; Is there a better way to do this with just sql (I'm using codeigniter, and would ideally like to use the Active Record class)?

    Read the article

  • Combining a web application with another (larger).

    - by Kevin Brown
    I'm writing a web app, initially meant to be stand-alone--it's essentially a survey with user-management/authentication built on Codeigniter. The company I'm doing this for wants to merge it with their main system so that it acts like a feature, or a sub-app of their website. What is the best thing for me to do? I think I could do one of two things: Finish my application, as I had planned to initially, and let them handle the merging.It would probably save me a headache. Stop where I am in development, and migrate my authentication system to theirs, migrate the payment system to use theirs, and then finish the app. In your opinion, or experience, what is the best thing to do?

    Read the article

  • Mixture of php shorttags

    - by drpcken
    I'm taking over a codeigniter project and notice the original dev uses a mixture of short tag and php tags in the views. For example: <div id="content"> <?=show_header()?> <ul id="products"> <?php if (count($products) > 0) : ?> <?php foreach($products as $product) : ?> ... </div> Is this bad practice to inherit? I think it is already causing me problems in my dev environment.

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >