Mismatch token error
You have to include the token in a hidden input:
<input type="hidden" name="_token" value="{{ csrf_token() }}">
Or there is a shorter way.
{{ Form::token() }}
This way the token will be added to the POST and you can check it in your filter:
Route::post('register', array('before' => 'csrf', function()
{
return 'You gave a valid CSRF token!';
}));
Passed variables
Your submit button is a big mess. You have to put the variables into hidden input fields. This way after submit the POST will contain them because the form data is what will be sent in it.
<input name="course_id" type="hidden" value="{{ $courseid }}">
Also use the Blade template engine by naming your views with a .blade.php
ending. This way you can echo
something by using the {{ $echoed_variable }}
syntax.