• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I echo datase id in base url? CI4?

#1
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.