Thankyou Jitendra,
But i have another problem..it's like mt stdClass object
{
[transactionid]=sedd
[submitbutton]=enrol me
[id]=8
[instance]=24
}
and my enrol_page_hook(stdClass $instance) code is in following.
if ($DB->record_exists('user_enrolments', array('userid'=>$USER->id, 'enrolid'=>$instance->id))) {
//TODO: maybe we should tell them they are already enrolled, but can not access the course
//return null;
return $OUTPUT->notification(get_string('notification', 'enrol_apply'));
}
Now, i want that a unique or user id could be sent through the form and saved in the enrolment plugin database table..so that i get the transaction id from the database.