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 8677421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:27:11+00:00 2026-06-12T20:27:11+00:00

i have views here <?php echo form_open(‘c_kategorimaterial/tambah’); ?> <table> <tr> <td>Kode Kategori Material /

  • 0

i have views here

 <?php echo form_open('c_kategorimaterial/tambah'); ?>
            <table>

                <tr>
                    <td>Kode Kategori Material / Jasa</td> //primary key of table
                    <td><?php $inkode=array('name' => 'kkmj', 'disabled' => 'disabled', 'value' => $nextval, 'class' => 'GUI'); echo form_input($inkode) ?></td>
                    <td class="error"> <?php echo form_error('kkmj'); ?></td>
                     //i make the form_input disabled, because the value is
                     //auto generated from the last ID of table in database
                </tr>
                <tr>
                    <td>Nama Material / Jasa</td>
                    <td><?php $innama=array('name' => 'nmj',  'class' => 'GUI'); echo form_input($innama) ?></td>
                    <td class="error"> <?php echo form_error('nmj'); ?></td>
                </tr>
                <tr>
                    <td></td>
                    <td><?php $intambah=array('name' =>'login','class' =>'button','value' => 'Tambah'); echo form_submit($intambah); echo nbs(); $inreset=array('name' =>'reset','class' =>'button','value' => 'Hapus'); echo form_reset($inreset); ?></td>
                </tr>
             <?php echo form_close(); ?>

and it pass the value to the controller

 function tambah()
{
   $id = $this->input->post('kkmj');
   $nama = $this->input->post('nmj');

    $this->form_validation->set_rules('nmj','Nama','trim|required|min_length[2]|max_length[20]|xss_clean');
    if($this->form_validation->run() == false)
    {
        $lastval = $this->m_admin->getlastval('KKMJ','ms_kategori_material','kode_kategori_material_jasa');
        $data['nextval'] = $this->m_admin->gencode('KKMJ',3,$lastval); 
        $data['title'] = 'QB Tambah Kategori Material';

        $this->load->view('head',$data);
        $this->load->view('content/add_kategori_material',$data);
    }
    else
    {
        echo 'id adalah '.$id.' namanya adalah '.$nama; //$id is not printed

    }


}

and then i fill the second field with ‘water’ and click the button. my page showing blank white screen with a text id adalah namanya adalah water

how come the ID is not printed ? how do i resolve this ?

  • 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-06-12T20:27:13+00:00Added an answer on June 12, 2026 at 8:27 pm

    Disabled elements do not get posted when you submit a form. If you need a field with unchangeable value, try to set it as read-only instead of disabled.

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

Sidebar

Related Questions

i have view vkategorimaterial like this <table border=1> <tr> <td colspan=4>Tampilkan<?php echo form_open('c_kategorimaterial/cari'); echo
I was implementing an android FFT guitar tuner. Here, I have 2 text views,
Here is the situation, i have a widget containing two text views and i
I'm missing something fundamental here. I have a table view with each cell displaying
i have the following search form <?php echo $this->Form->create('Order', array('action' => 'search','type'=>'get'));?> <?php echo
I have the following code for my login view: <?php echo $session->flash('auth'); echo $this->Form->create('User',
Very basic seeming PHP question here... I have a page to which I'm already
Form on Page: <div> <?php echo form_open('add/player'); echo form_label('First Name','playerFirstName'); echo form_input('playerFirstName','test'); echo <br
I have a layout setup which can be view here: http://jsfiddle.net/Pn3ts/ It all works
I have a view that dynamically updates depending on user input - here's how

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.