hi everyone.. im creating my own module and im using drupal_js which loads a textarea if 1 is selected in the select box. my problem is i cant store the data in my textarea into my database. how do i solve it?
thanks..
here is my module code:
<?php
// $Id$
/**
* @file
* Provides a "daily report" node type.
*/
/**
* Implementation of hook_node_info().
*/
function dailyreport_node_info() {
return array(
'dailyreport' => array(
'name' => t('Daily Report'), // Required.
'module' => 'dailyreport', // Required.
'description' => t('Submit or view daily reports'), // Required.
'has_title' => TRUE,
'title_label' => t('Module Name')
)
);
}
/**
* Implementation of hook_menu().
*/
function dailyreport_menu($may_cache) {
$items = array();
// Do not cache this menu item during the development of this module.
if (!$may_cache) {
$items[] = array(
'path' => 'node/add/dailyreport',
'title' => t('Daily Report'),
'access' => user_access('submit or view daily reports'),
);
}
return $items;
}
/**
* Implementation of hook_access().
*/
function dailyreport_access($op, $node) {
global $user;
if ($op == 'create') {
return (user_access('submit report'));
}
if ($op == 'update' || $op == 'delete') {