codeigniter

Passing form data to controller using AJAX and jquery with Codeigniter

*爱你&永不变心* 提交于 2019-12-22 17:51:51
问题 I am trying to post the data from this form into the database. I have tried some tutorials with no success. Here is my code. Any ideas? View: <form method="post" name="myForm1" id="myForm1" enctype="multipart/form-data" > Email: <input type="text" name="email" id="email"> Question: <input type="text" name="qText" id="qText"> <input id="submitbutton" type="submit"> </form> AJAX (in the view, right below the form) <script type='text/javascript' language='javascript'> $("#submitbutton").click

Function mcrypt_get_iv_size() is deprecated in codeigniter on PHP version 7.1

╄→гoц情女王★ 提交于 2019-12-22 17:49:17
问题 When I encrypt my ID using encrypt library that time it gives me an error like : Thanks for your help 回答1: codeigniter already mention it on their official documentation of encrypt Library This library has been DEPRECATED and is only kept for backwards compatibility. Please use the new Encryption Library. use new Encryption Library. https://codeigniter.com/userguide3/libraries/encryption.html 回答2: I'm using php 7.2 and I can solve using the new library encryption recommend. Example: //

Live search using Codeigniter Mysql

北城余情 提交于 2019-12-22 17:37:45
问题 I am doing a project on Live Search Using Jquery Ajax, Php Codeigniter and Mysql Here is my model Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Subjectmodel extends CI_Model { public function __construct() { parent::__construct(); } function getSubject($search){ $this->db->select("SUB_ID,NAME"); $whereCondition = array('NAME' =>$search); $this->db->where($whereCondition); $this->db->from('ix08s_subjects'); $query = $this->db->get(); return $query-

Codeigniter Call to a member function set_userdata() on a non-object

偶尔善良 提交于 2019-12-22 17:35:19
问题 I am getting a fatal error in a CI app that I just moved from a php4 shared host to a php5 shared host. Fatal error: Call to a member function set_userdata() on a non-object in /home/chuck_ravenna/bob.ravennainteractive.com/system/application/helpers/authenticate_helper.php on line 13 Code in full located in the link below https://gist.github.com/1474173 I am trying to figure out if the php version could be the issue. The site runs fine on the old server, and the new server doesn't have php4

Codeigniter Call to a member function set_userdata() on a non-object

杀马特。学长 韩版系。学妹 提交于 2019-12-22 17:34:23
问题 I am getting a fatal error in a CI app that I just moved from a php4 shared host to a php5 shared host. Fatal error: Call to a member function set_userdata() on a non-object in /home/chuck_ravenna/bob.ravennainteractive.com/system/application/helpers/authenticate_helper.php on line 13 Code in full located in the link below https://gist.github.com/1474173 I am trying to figure out if the php version could be the issue. The site runs fine on the old server, and the new server doesn't have php4

prevent cookie when running script from CLI in codeigniter

本小妞迷上赌 提交于 2019-12-22 17:06:55
问题 Is there a way of preventing session class to set cookie and adding a record in database when calling it from the command line? 回答1: The simplest way I think would be to extend the Session class like this : <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class MY_Session extends CI_Session { public function __construct() { $CI = get_instance(); if ($CI->input->is_cli_request()) { return; } parent::__construct(); } } Just place it in the application/libraries folder.

CodeIgniter, Jquery Ajax, Form Submission and File Upload

二次信任 提交于 2019-12-22 17:06:53
问题 I am working on a website using CodeIgnitor Framework. Question is related with CodeIgniter, Jquery Ajax, Form Submission and File Upload MY HTML is : Given only relevant section of HTML below <form method="post" action="" id="upload_file" enctype="multipart/form-data"> <div id="inner2" style="display:none"> <div class="trainingcontent" style="height:400px;"> <div class="chaptername" > <p>Chapter Name</p> <input type="text" id="cname" name="cname" class="awesome-text-box" /> <input type=

Forgot password in codeigniter

给你一囗甜甜゛ 提交于 2019-12-22 16:03:21
问题 I need to implement a forgot password to a login page. First I verify email then generate a string, after that send a link with key and email to the particular mail. I know how to reset but what happened receive the link to that mail $message= "<a href='".base_url()."user/reset_pass/$key/$email'>"; This is the link I provided. 回答1: First you need to check if session exist when user click on forgot password. if No,then set validation method for email which you will be taking from user. like

Forgot password in codeigniter

痴心易碎 提交于 2019-12-22 15:56:02
问题 I need to implement a forgot password to a login page. First I verify email then generate a string, after that send a link with key and email to the particular mail. I know how to reset but what happened receive the link to that mail $message= "<a href='".base_url()."user/reset_pass/$key/$email'>"; This is the link I provided. 回答1: First you need to check if session exist when user click on forgot password. if No,then set validation method for email which you will be taking from user. like

Posting on Facebook wall from Codeigniter app

只愿长相守 提交于 2019-12-22 14:08:56
问题 I have a CI-based app that allows users to post an update stream similar to Facebook's wall. Currently, users can authenticate into my app via Facebook using FB connect. I would like to offer the possibility of a user -- when posting to my app's wall -- also be able to send the same post to his/her Facebook wall. It seems clear the FB's Graph API support this but I'm having a hard time in finding a roadmap/ code/ library to help with this. The example on the above link is unhelpful and doesn