I have tried the following code to pass the value from my_view.php(view) to myproject/delete (controller method) in codeigniter.
$val=$my_records['roll_no']
up to here, there is no error and the roll no is stored in value and when i print that value, it is printed. But when I passed the $val to the method delete of controller class, it showed an error message
“The URI you submitted has disallowed characters.”.
The portion of my code is:: echo site_url('myproject/update/$val')
there is a method update in my controller myproject.php and it takes $roll_no as argument.
How to fix it?
Use double quotes for your parameter. Single quotes prevent the variable from being parsed as PHP considers the
$to be a string literal.