Welcome, Guest
You have to register before you can post on our site.



Search Forums

(Advanced Search)

Forum Statistics
» Members: 11,788
» Latest member: JobeHead
» Forum threads: 68,119
» Forum posts: 425,045

Full Statistics

Latest Threads
Get data from two tables ...
Forum: General Help
3 minutes ago
» Replies: 1   » Views: 35
PHP 7.2.8 Has Been Releas...
Forum: Lounge
23 minutes ago
» Replies: 0   » Views: 6
Forum: Choosing CodeIgniter
2 hours ago
» Replies: 1   » Views: 101
Error reporting sending t...
Forum: General Help
3 hours ago
» Replies: 3   » Views: 36
SELECT selected CHECKBOX ...
Forum: Issues
4 hours ago
» Replies: 4   » Views: 57
PHP file_exists() functio...
Forum: General Help
5 hours ago
» Replies: 5   » Views: 169
Private Messages - defaul...
Forum: News & Discussion
5 hours ago
» Replies: 5   » Views: 5,891
How to add session data
Forum: Libraries & Helpers
7 hours ago
» Replies: 3   » Views: 79
codeigniter 3.1.9 with ap...
Forum: General Help
Yesterday, 06:21 PM
» Replies: 18   » Views: 519
Session issue
Forum: CodeIgniter 3.x
Yesterday, 03:06 PM
» Replies: 1   » Views: 56

  Is it possible to read PUT and DELETE requests using codeigniter?
Posted by: aslamdoctor - 07-12-2018, 12:44 AM - Forum: General Help - Replies (1)

I am creating an API server using CI and created few basic functions like insert, update, delete, read. But I was wondering if it is possible to do update action by reading PUT request from any form and do delete action using DELETE request.

I tried to look into user guide, and as it says on below link, we can do it using input_stream method.

Not sure how to do that. Any help?

  File type returning NULL - Did actually work but I don't know what I have done. Help!
Posted by: dreamweaver - 07-12-2018, 12:22 AM - Forum: Lounge - Replies (3)

Before the breakdown the view was returning a string and storing that string in a database. Since its my first time trying a project, a run into a problem where previously it worked, and then after it just decided to stop working. 

The Error Message: 
A PHP Error was encountered
Severity: Notice
Message: Undefined index: picture
Filename: models/Horse_model.php
Line Number: 23
File: C:\xampp\htdocs\rusaliite\application\models\Horse_model.php
Line: 23
Function: _error_handler

File: C:\xampp\htdocs\rusaliite\application\controllers\Horse_controller.php
Line: 27
Function: create

File: C:\xampp\htdocs\rusaliite\index.php
Line: 315
Function: require_once

The View:
<div id="body">
    <?php echo validation_errors(); ?>
        <?php echo form_open_multipart('horse_controller/create'); ?>
            <form style="width: 30%;">
                <div class="form-group">
                    <input name="name" class="form-control" maxlength="20">
                <div class="form-group">
                    <label>Bulgarian Name</label>
                    <input name="name_bulgarian" class="form-control" maxlength="20">
                <div class="form-group">
                    <input name="sex" class="form-control" maxlength="1" placeholder="M or F">
                <div class="form-group">
                    <label>Stable Number</label>
                    <input name="stable_no" class="form-control" maxlength="2" type="number">
                <div class="form-group">
                    <input name="picture" type="file" class="form-control-file">
                <button type="submit" method="POST" class="btn btn-primary">Submit</button>

The Controller:
public function create()
        if($_SERVER['REQUEST_METHOD'] == 'POST')
            // $config['upload_path']          = './uploads/';
            // $config['allowed_types']        = '';
            // $config['max_size']             = 0;
            // $config['max_width']            = 0;
            // $config['max_height']           = 0;
            // $this->load->library('upload', $config);
            // $this->upload->do_upload('photo');

            $data['horses'] = $this->Horse_model->create();


The Model:
   public function create()
       $this->name             = $_POST['name'];
       $this->name_bulgarian   = $_POST['name_bulgarian'];
       $this->sex              = $_POST['sex'];
       $this->stable_no        = $_POST['stable_no'];
       $this->picture          = $_POST['picture'];

       $this->db->insert('horse', $this);

  facing problem in website coding
Posted by: Allenparker - 07-11-2018, 11:35 AM - Forum: Installation & Setup - Replies (1)

I have a website which is related to a antivirus, I want to change the background images so that didn't know the code to this. after that, I take a help of **unrelated link redacted** to solve the issue but still, the problem is happening. is it possible refer me to a page or site so that I can solve the issue properly?

  right click button in keyboard should be disabled to protect my sheet
Posted by: kvanaraj - 07-11-2018, 03:55 AM - Forum: Lounge - Replies (3)

I already have an script to right click button to protect my page. but 
in keyboard there is a one button called right click (near CTRL). that button shows everything . how to fix it error.

  'Greater than' operator is working but not 'lesser than' in Model class
Posted by: Leolabs - 07-11-2018, 02:31 AM - Forum: Model-View-Controller - Replies (3)

This is my example table:

infoID   userNAME
1         Alpha
2         Bravo
3         Charlie
4         Delta
5         Echo

This is my model:
public function get_next_info() {
    $a = $this->input->post('infoID');        
    $this->db->where('infoID >', $a);        
    $query = $this->db->get('info');                 
       return $query->row_array();            
public function get_previous_info() {
    $a = $this->input->post('infoID');        
    $this->db->where('infoID <', $a);        
    $query = $this->db->get('info');                 
       return $query->row_array();
My issue is 'get_next_info' is working fine in my view,when a 'NEXT' button is pressed,the data is able to display from 1 to 2 to 3 and so on,But when a 'PREVIOUS' button is pressed,the data straight go back id no1,instead of  3 to 2 to 1 as intended.

Anything wrong with my 'get_previous_info' query?

Question Condition Statement Builder?
Posted by: kaitenz - 07-11-2018, 01:49 AM - Forum: General Help - Replies (5)

Is it safe to create a "conditional statement builder" for my custom upload page?

Here's an example:
The admin wants to update the userlist but she don't want to require some column upon upload.
Then 1 week had passed, and the requirements changed due to some reason. The admin now have to update the userlist but she wants to require some column. Then maybe next week, she will add a new condition that this column should be number only.

Did someone get my point? Hahahaha. I hope you understand what I want to happen.

I will be working on a conditional statement builder interface (consist of dropdowns, textboxes for custom inputs) that users can build a, you know, conditional statement:

if [dropdown_fieldname] is [dropdown_comparison_text] to [dropdown_fieldname_or_value] then [dropdown_possible_options]

if [first_name] is [not_equal] to ["Francis"] then [skip_row_upload]

  scroll bar my header also scrolled
Posted by: kvanaraj - 07-11-2018, 01:38 AM - Forum: Lounge - Replies (3)

<div style="width: 100%; height: 320px; overflow: scroll;" > 
<div class="box-body table-responsive no-padding">

                  <table class="table table-hover" id="mytable1">

my header also scrolled. how to correct this functionality?

  disable/hide button using condition in controller
Posted by: kvanaraj - 07-10-2018, 11:46 PM - Forum: General Help - Replies (1)

how to disable.hide one submit button (Register) in the controller

My query should be like this

 $query = $this->db->query("select count(*) as cnt from student where brcode=$brdata and sem=$semester and inst_code=$inst_code");
        $row = $query-> row_array ();
        $max_id = $row ['cnt']; 
        $max_id1 = (int) ($max_id);
        $cntt = $max_id1;

        if ( $cntt > 0 )
          Disable button Register how?
enable button Register }

  html linking not working
Posted by: kvanaraj - 07-10-2018, 11:24 PM - Forum: Lounge - Replies (5)

<body id="myPage" data-spy="scroll" data-target=".navbar" data-offset="60">
<div class="main-header" id="main-header">
  <nav class="navbar mynav navbar-fixed-top">
    <div class="container">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
        <a class="navbar-brand" href="#">Baskaran</a> </div>
      <div class="collapse navbar-collapse" id="myNavbar">
        <ul class="nav navbar-nav navbar-right">
          <li class="active"><a href="#banner">Home</a></li>
           <li><a href="#work">About</a></li>
            <li><a href="#edu">Education</a></li>
             <li><a href="#exp">Experience</a></li>
              <li><a href="#res">Research</a></li>
          <li><a href="#award">Award</a></li>
          <li><a href="#testimonials">Testimonial</a></li>
          <li><a href="#portfolio">Portfolio</a></li>
          <li><a href="#contact">Contact Us</a></li>

all container are single file. I want it to be separate.

like this
<li><a href="#work">About</a></li>
            <li><a href="pages/edu.html">Education</a></li>
             <li><a href="pages/exp.html">Experience</a></li>
              <li><a href="pages/res.html">Research</a></li>
          <li><a href="pages/awa.html">Award</a></li>
          <li><a href="pages/tes.html">Testimonial</a></li>
          <li><a href="pages/por.html">Portfolio</a></li>
          <li><a href="pages/con.html">Contact Us</a></li>

when i call index file this URL not working.
this is the html page ,based on this i will call my php projects.
If i am view in the source code , link is working.
what mistake i have done.

Attached Files Thumbnail(s)

  Gmail giving warning when receiving email
Posted by: phishyman2 - 07-10-2018, 07:09 PM - Forum: General Help - Replies (1)

This thread contains two problems.

Problem #1

I have a page that sends an email. Problem is when I receive the email to a gmail account is get the following error:

Be careful with this message
Gmail could not verify that it actually came from [email protected] Avoid clicking links, downloading attachments, or replying with personal information.

Obviously this is not going to work as the email contains a link to the customers invoice. 

Here is the code below. Any ideas how I can avoid this. 

PHP Code:
  public function boatsale_email($id) {
    $this->load->model'Customers_model' ); //loads model
    $data $this->Boatsale_model->get_boatsale_code($id);
    $data2 $this->Customers_model->get_cust_info_edit_bs$id );
    $bs_code $data->bs_code;
    $email $data2->email;
    $this->email->from('[email protected]''Central Georgia Marina');
    $this->email->reply_to('[email protected]''Central Georgia Marina');
    $this->email->set_alt_message('To view the message, please use an HTML compatible email viewer!');
    $this->email->subject('Your Central Georgia Boat Sale Invoice');
    $this->email->message('Please click ' base_url(). 'boatsale/boatsale_inv/' $bs_code ' to view and print your recent invoice');

Problem #2
The time it takes between the $this->email->send() and the redirect is 10-15 seconds. Seems kinda long. Any way to speed this up?

Thanks in advance for your help

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.