I am absolute beginner to drupal.
I have added a contact form (using Webform module).
Now I want to save the data entered in the form. But I am lost. I have searched over internet, found db_query() is used to query database.
But I dont know where to write the php code. Please help me or if you know any link,please give me.
The tables you’ll be most interested in are
webform,webform_submissions,webform_submitted_dataandwebform_component. Have a look at those tables and it becomes very obvious how they’re linked together.You’ll want to look at the Drupal 7 Database API to learn how to use the query system but here’s an example to get you going:
At the end of that code you’ll have an array (
$submission_data), which contains a list of arrays of submission data for the provided node. Each of those arrays’ items has a key of the component label, and a value of the submitted user value.Hope that helps