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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:16:00+00:00 2026-06-12T21:16:00+00:00

i have table here <?php if ( !empty($kirim) ) { $no = 1; foreach

  • 0

i have table here

 <?php     if ( !empty($kirim) ) 
                      {  
                            $no = 1;   
                            foreach ($kirim as $row) { ?>  
                            <tr id="row">  
                             <td id="no"><?php echo $no;?></td>  
                             <td id="judul"><?php echo $row->Kode_Kategori_Material_Jasa;?></td>  
                             <td id="kategori"><?php echo $row->Nama_Material_Jasa;?></td>  
                             <td id="action"> Edit | Delete </td>
                         //idk how to pass the value for updating
                        //and using YES or NO DialogResult for deleting
                            </tr>  
                            <?php  
                             $no++;  
                            }  
                     } 
                     else { ?>  
            <tr id="row">  
            <td colspan="6" align="center">Tabel Kosong</td>  
            </tr>  
        <?php  
        }  
        ?>

and i want to pass the Kode_Kategori_Material_Jasa and Nama_Material_Jasa to another form, so we can update the values there, and update the DB record. i have made the form and i confuse to pass the value direct to the update form. or pass them to the controller, then pass it again to the update form.

i was adding some code here

<td id="action"> <a href="<?php echo site_url('/c_kategorimaterial/ubah/').$row->Kode_Kategori_Material_Jasa/$row->Nama_Material_Jasa; ?> ">Edit </a>| Delete </td>                  

then i got error like Division by zero

  • 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-12T21:16:01+00:00Added an answer on June 12, 2026 at 9:16 pm

    The way I would do it is using either POST or GET (depending how sensible is your data).

    Using GET:

    <td id="action"> <a href="<?php echo(site_url('/c_kategorimaterial/ubah/').$row->Kode_Kategori_Material_Jasa."/".$row->Nama_Material_Jasa; ?> ">Edit </a>| Delete </td>
    

    Notice you missed ."/". between the first and the second time you echo $row->Kode_Kategori_Material_Jasa

    Using POST

    1. Define a field in your form like:

      <input type="hidden" name="<?php echo ($row->Kode_Kategori_Material_Jasa);?>" value="<?php echo($row->Kode_Kategori_Material_Jasa);?>">
      
    2. Retrieve the value in the destination controller (the one you set in you action=URL in the form tag) by using $_POST

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

Sidebar

Related Questions

I have a problem with sorting items in table in PHP. Here is what
Trying to have my PHP script return some SQL table queries. Here's my script
i have view vkategorimaterial like this <table border=1> <tr> <td colspan=4>Tampilkan<?php echo form_open('c_kategorimaterial/cari'); echo
here is my mysql and php code layout: I have 3 tables tableA stores
Lets say we have a table here, populated with the following data: acc_id1 acc_id2
I have a table named size here, something like this: size id | size
enter code here I have a table on SQL server 2005 with bigint primary
I have a table in sql 2008 named tblEmployeeAttendance like Here is some dummy
I have the table users and scores . Here are the associations: belongs_to :user
here's my question: I have a table TRUST(id INT, trustlevel INT) which contains records

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.