Skip to main content

matching outputted Html buttons with outputted Php/MySQL data





public function dcr() {

$query = $this->db->query("SELECT * FROM church_repo");

foreach ($query->result() as $row) {

$data = array('churchName' => $row->church_name,

'streetAddress' => $row->street_address,

'locationalState' => $row->locational_state,

'locationalZIP' => $row->locational_zip,

'locationalCountry' => $row->locational_country,

'locationalCity' => $row->locational_city,

'overseerAccountId' => $row->overseer_account_id,

'taxExemptionNumber' => $row->tax_exemption_number,

'accountStatus' => $row->status,

);

$this->load->view('admin-request', $data);

}

}







In my Html I am outputting the above Php. Also in my Html, I have two buttons that have id's of 'pass' and 'fail'. What the script is doing when I have multiple rows is output those two buttons with the same id's on each outputted row. That's good, because it is doing what it needs to be doing, but now I'm not able to identify the outputted rows. So I need to be able to match each button set with the outputted Php. Any ideas?


Comments

  1. The way i typically do what you are attempting is by creating new forms for each row. and including a hidden input field in each row with the id.

    <input type="hidden" name="row_id" value="<?= $overseerAccountId;?>"/>

    when the user clicks pass/fail you simply use CI/PHP to get that value

    <?php
    echo $this->input->post('row_id');
    //do work son.
    ?>


    the only difference between your code and what i typically do, is i move my foreach into the view and iterate through each row creating new <tr><td> instead of creating new tables like you are doing. But this could be considered against the MVC standard

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?

CCNA 3 Final Exam => latest version

1 . Which security protocol or measure would provide the greatest protection for a wireless LAN? WPA2 cloaking SSIDs shared WEP key MAC address filtering   2 . Refer to the exhibit. All trunk links are operational and all VLANs are allowed on all trunk links. An ARP request is sent by computer 5. Which device or devices will receive this message? only computer 4 computer 3 and RTR-A computer 4 and RTR-A computer 1, computer 2, computer 4, and RTR-A computer 1, computer 2, computer 3, computer 4, and RTR-A all of the computers and the router   3 . Refer to the exhibit. Hosts A and B, connected to hub HB1, attempt to transmit a frame at the same time but a collision occurs. Which hosts will receive the collision jamming signal? only hosts A and B only hosts A, B, and C only hosts A, B, C, and D only hosts A, B, C, and E   4 . Refer to the exhibit. Router RA receives a packet with a source address of 192.168.1.65 and a destination address of 192.168.1.161...