@kkshansid
yes and no. the form’s
action attribute is required (you must not leave that out) if you want to submit the form.
validation as is does not require a form per se. it simply means “check if a set of values is valid (conforms to a certain schema)”. though it is obvious that you should validate the user’s input you get (and a form is the standard method to get user input through (a) HTML (page)).
@kkshansid
validation does not depend on a form (validation starts when you tell your script to do so),
action="printstudent.php" simple tells the browser, where to send the form data.
@kkshansid
you have to make them somehow. although PHP can help you with the computation, you have to provide the data (it’s like giving a child a name)