0

I want to fetch student result from database, by asking user to enter roll number and name. I have created a webform to take inputs but I don't know how to fetch the records from the database and display it in tabular form. Kindly tell how to fetch the record and display it.

One thing I tried is create a form in basic page content type using HTML and do the required using PHP, but I cannot figure out how to do if the form is created using Webforms.

  • use this drupal.org/project/views module, before that check this documentation views-help.doc.logrus.com – Bala Oct 20 '13 at 8:07
  • @Bala, the method that I tried of HTML and PHP in Basic Page content is a valid method to be used or not ?? – Rahul Joshi Oct 20 '13 at 8:16
  • @RahulJoshi, Creating form in basis page content using HTML and PHP is not good solution. You should create your custom module and use form api. – Jayendra Kainthola Oct 21 '13 at 6:09
1

The requirement you have asked can be easily achieved without making custom queries or use of webform module

Consider this: If the students enrolled are supposed to login into your site, then with no doubt use user entity and wherever you want to list the students in tabular form or simple list use views module as suggested before.

If the students are not supposed to login to the system they go well with node entities,for that simply create a content type as students with field on it as you require like roll number etc.. again to list them simply use views module it will do the query for your plus will allow you to show the results in tabular way.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.