Welcome Guest, Not a member yet? Register   Sign In
How do I echo datase id in base url? CI4?
#1

(This post was last modified: 03-29-2021, 08:08 PM by olumideaeo.)

I am trying to edit user-specific information from the database using id. I have used a hidden input field for the user id but want to assign it so the form can load each user's details.

I have assigned the value of the hidden user-id field in the controller. What will be the proper syntax to edit the id using the Edit button. The method and controller work fine but not bring out user-specific form I linked to the method. I have used [color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]<?php echo base_url('/dashboard/fetch_single_data.$member['id'])?> but did not work. Kindly assist
<tbody>
                    <?php foreach ($users as $member) { ?>
                      <tr>
                        <td style="text-align: center;"><?php echo $member['id']; ?></td>
                        <td style="text-align: center;"><?php echo $member['title']; ?> <?php echo $member['surname']; ?> <?php echo $member['first_name']; ?> <?php echo $member['middle_name']; ?></td>
                        <td style="text-align: center;"><?php echo $member['work_place']; ?></td>
                        <td style="text-align: center;"><?php echo $member['email']; ?></td>
                        <td style="text-align: center;"><?php echo $member['member_num']; ?></td>
                        <td><a href="<?php echo base_url('/dashboard/fetch_single_data')?>" class = "btn btn-primary">Edit</a></td>
                        <td><a href="<?php echo base_url('/dashboard/fetch_single_data')?>" class = "btn btn-primary">Delete</a></td>
                      </tr>
                    <?php } ?>
                  </tbody>
Reply


Messages In This Thread
How do I echo datase id in base url? CI4? - by olumideaeo - 03-29-2021, 07:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB