I feel like it's a common question but I didn't find a proper answer for it so I ask you ! ;)
Let's start with the form in classic index.php :
...
<form action="<?php echo BASE_URL; ?>">
<div style="color:white">Instructions</div>
<input type="number" name="param" />
<input type="hidden" name="action" value="view" />
<input type="hidden" name="controller" value="Solution" />
<input type="????" name="instance_id" value="?????" />
<input type="submit" value="Solutions Listing" id="button_solutions">
</form>
...
The question here is the last input field before the submit button. The user is supposed to enter param in the first non-hidden input, and that should trigger a php function which determine the instance_id by picking into a database.
What I want to do is that when the user click on submit, it redirect through a link like
BASE_URL."?controller=Solution&action=view¶m=toto&instance_id=value"
let's say my function in php which pick into the database is called toto(), toto returns instance_id. I know how to point to an url with GET parameters via the form, but I don't know how to trigger the php function. I know how to determine instance_id via the param input but I don't know how to create a redirection with GET parameters via a php function
please any help would be considered Thanks