I want to send the selected item value along with the some attribute (stud_name) value. Is there any functionality in PHP to do so? Here is the example one.
You will have to use JavaScript. The browser will only send the value
of the selected option (so its not PHP's fault).
What your JS should do is hook into the form's submit event and create a hidden field with the value of the selected option's stud_name
value. This hidden field will then get sent to the server.
That being said ... you shouldn't relay on the client to provide the correct data. You already know what stud_name
should be for a given value on the server (since you are outputting it). So just apply the same logic when you are processing the form.