Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4341468
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:29:21+00:00 2026-05-21T11:29:21+00:00

Kindly have a visit on following link: Demo link for problem You can view

  • 0

Kindly have a visit on following link: Demo link for problem

You can view that form is not showing submitted values and not uploading file.

Following is form code :

<form id="frm" name="frm"  method="post" enctype="multipart/form-data">
            <fieldset class="fieldset2">

                <legend class="legend2">Add Bid Type</legend>

                <div class="form_fields">

                <p>
                <label for="subject" class="label2">Bid Type:</label>
                <input type="input" id="type" name="type" class="textfield2" />
                </p>

                <p>
                <label for="subject" class="label2">Bid Type Code:</label>
                <input type="input" id="code" name="code" class="textfield2" />
                </p>


                <p>
                <label for="description" class="label2">Bid Type Description:</label>
                <textarea id="description" name="description" class="textarea2"></textarea>
                </p>




                <p>
                <label for="userfile" class="label2">Icon:</label>
                <input type="file" id="userfile" name="userfile" class="input_file"  />
                </p>


                </div>

            </fieldset>

            <fieldset class="none">
            <p>
                <input type="submit" id="btnsubmit" name="btnsubmit" class="btn" value="Add" />
    <input type="reset" id="btnreset" name="btnreset" class="btn" value="Reset" />
            </p>
            </fieldset>
        </form>`

And following is controller code :

function create() {

        $data = '';


        echo '<pre>';
        echo 'below is Post Fields Data:<br>';  
        print_r($this->input->post());
        echo '<br>Post Fields Data Ends: ';     

    echo '</pre>';



        $this->form_validation->set_rules('type', 'Bid Type', 'trim|required|xss_clean');
        $this->form_validation->set_rules('code', 'Bid Type Code', 'trim|xss_clean');

        $this->form_validation->set_rules('description', 'Bid Type description', 'trim|xss_clean');

        $data['errors'] = array();

        if ($this->form_validation->run()) {
                $data = array(
                    'code'          => $this->form_validation->set_value('code'),
                    'type'          => $this->form_validation->set_value('type'),
                    'description'   => $this->form_validation->set_value('description'),

                );

                if (!is_null($this->bid_types->create_bid_type($data))){
                        $data['errors']['success'] = 'Record Successfully Added!';


                } else {

                    $errors = $this->bid_types->get_error_message();
                    foreach ($errors as $k => $v)   $data['errors'][$k] = $this->lang->line($v);

                }       

        $config['upload_path'] = base_url().'resource/images/uploads/';
        $config['allowed_types'] = 'gif|jpg|png';
        //$config['max_size']   = '100';
        //$config['max_width']  = '1024';
        //$config['max_height']  = '768';

    $this->load->library('upload', $config);

    if ( ! $this->upload->do_upload())
    {
        $data['errors']['upload'] = 'Not Uploaded';
        //$data['errors']['upload'] = $this->upload->display_errors();
        //$error = array('error' => $this->upload->display_errors());

        //$this->load->view('upload_form', $error);
    }
    else
    {
        $data['errors']['upload'] = 'Yes Uploaded';
        //$data['errors']['upload'] = $this->upload->data();
        //$data = array('upload_data' => $this->upload->data());

        //$this->load->view('upload_success', $data);
    }

    echo '<pre>';           
        print_r($this->upload->data());

    echo '</pre>';

        } /* END OF FORM VALIDATRION RUN */

        if(!$this->input->is_ajax_request() && !$this->input->get_post('is_ajax'))
        {   
            $this->load->view('bend/bid_type/create', $data);

        }                               


} /* END OF FUNCTION CREATE */ 

Can some one guide me what and where Iam doing wrong and how it can be rectrified.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T11:29:22+00:00Added an answer on May 21, 2026 at 11:29 am

    File data appears in $_FILE not in $_POST.

    I think this line is your problem:

    $config['upload_path'] = base_url().'resource/images/uploads/';
    

    This $config['upload_path'] should point to a file system path, not a URL.
    Try something more like:

    $config['upload_path'] = realpath(APPPATH . '../resource/images/uploads/');
    

    which will start from your application folder, up one folder then into resource/images/uploads
    change it accordingly if its somewhere else.

    p.s. Also check your write permissions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Kindly visit the following website: property.consultfinman.com You must have seen the problem, if you
Would someone kindly assist me with the following? I have two DataGridView objects that
I have the following input values and I was hoping someone could kindly tell
I have a script that somebody from SO kindly provided to solve an issue
Please kindly help me in the following, I have $sub = C:\views\sght\gzad\text\hksdk\akldls\hool.java = C:\views\sght\bdsk\text\hksdfg\sdjks\same.java
This is my first post here so kindly pardon any mistakes that I have.
Well. Thanks for all your kindly help. I have learn from your that, to
I have converted HTML to DOC format using PHP. kindly view the below screen
Is there such a thing? Can anyone kindly elucidate on this? I have been
I have a solution from an earlier post that was kindly provided by Dimitre

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.