• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
post more value in href tag

Drop-down is browser side, so while technically you can add more attributes to URL, and your Controller can pick these up, you would either had to build a JS script that appends to href value, or you would have to change A tag to a Form submission:

<from action="<?= site_url("").'User/addsubjects/'.$row['subcode'] ?>" method="POST">
<select name="dropdown">...</select>
<input type="text" name="subcode">

PHP Code:
// Controller
public function addsubject()
   $dropdown $this->input->post('dropdown');
   $subcode $this->input->post('subcode');

Also, a quick note, to make code more readable, you should add all URL attributes inside site_url function like this
PHP Code:

Both ways technically work, but this is tidier and intended way.

Messages In This Thread
post more value in href tag - by kvanaraj - 07-10-2018, 02:47 AM
RE: post more value in href tag - by Pertti - 07-10-2018, 06:08 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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