title: Can't open the edit form from my custom Module (Beginning module development)
body: <p>I am a beginner in the module development field and i am facing a problem.
  I have created the .module file with the hook_menu function having following peice of code :-</p>
  
  <pre><code>  $items['game/add_tournament/view_tournament']=array(          
   'title'=&gt;'View Tournament',
   'description'=&gt;'Tournament View',
   'page callback'=&gt;'game_view_tournament_page',
   'access callback'  =&gt; 'user_access',
   );
  </code></pre>
  
  <p>My Page callback is following :-</p>
  
  <pre><code> function game_view_tournament_page() {         
    $header_table_edit = array( 
  // first cell has the following text 'Title' 
   array('data' =&gt; t('Tournament Name')), 
  // second cell has the following text 'Link to edit'
  array('data' =&gt; t('No of Weeks')),
  
  array('data' =&gt; t('Start Date')),
  
  array('data' =&gt; t('End Date')),
  
  array('data' =&gt; t('Edit'))
  );
  
  $query = db_query
  
  
  ( "select tournament_id ,tournament_name ,tournament_no_of_weeks ,tournament_start_date ,tournament_end_date from {tournaments} ");
  
  
     while ($data = db_fetch_object($query)) 
  {
      $rows_table_edit[] =  array(
      array('data' =&gt; l($data-&gt;tournament_name,   'game/add_tournament/view_tournament/' . $data -&gt; tournament_id)),
      array('data' =&gt; t($data-&gt;tournament_no_of_weeks)),
      array('data' =&gt; t($data-&gt;tournament_start_date)),
      array('data' =&gt; t($data-&gt;tournament_end_date)),  
      array('data' =&gt; l(t('Edit'),'game_tournament_edit/'.$data -&gt; tournament_id.'/edit')) ); 
  }
  
  
     $caption_table_edit = t('Table for edit nodes');
  
      return theme('table', $header_table_edit, $rows_table_edit);
  }
  </code></pre>
  
  <p>Till this point the site works fine. Now comes the problem.
  At this poinit i assume that another callback will be called when i hit edit button and that callback also should be registered in my hook_menu function.
  Here i don't know if this method is being called back or not .Since everytime i hit edit button i get a Page not found error. The following is the callback </p>
  
  <pre><code>  $items['game_week_edit/%game_abc/edit']=array(            
  'type' =&gt; MENU_LOCAL_TASK,   
   'access arguments' =&gt; array('access content'),
      'page callback' =&gt; 'game_week_edit_page',
      'page arguments' =&gt; array(1),
      );
  
    // The above code is in hook_menu function and the following code is outside hook_menu . Let me know if i am doing anything wrong.
  
   function game_week_edit_page($abc_id){
  return drupal_get_form('game_week_edit_form',$abc_id);
       }
  
  
     function game_week_edit_form( &amp;$form_state, $abc_id) {           
  $form = array();
  
  $options = array();
  $sql = "SELECT game_week_id,tournament_id,start_time,open_time,close_time FROM {game_week} where game_week_id='$abc_id'";
  $r = db_query($sql);
  
  $sql_tournament = "SELECT tournament_name FROM {tournaments} ";
  $r_tournament = db_query($sql_tournament);
  
  
         while ($row = db_fetch_array($r_tournament)) {
  $options[$row['tournament_name']] = $row['tournament_name'];
  }
  
  while ($row = db_fetch_object($r)) 
  {
   $form['tournament_name'] = array(
         '#type' =&gt; 'select',
         '#required'=&gt;true,
         '#title' =&gt; t('Select Tournament'),
         '#options' =&gt; $options,
           '#weight'=&gt;1,
           '#description' =&gt; t('&lt;br&gt;'),
         );
  $form['start_time'] = array(
        '#type' =&gt; 'textfield',
        '#required'=&gt;true,
        '#value'=&gt;t($row-&gt;start_time),
        '#title' =&gt; t('Enter Start Time'),
        '#size'=&gt;40,
        '#maxlength'=&gt;128,
        '#weight'=&gt;2,
        '#description' =&gt; t('Please enter start time.'),
        );
  
  $form['open_time'] = array(
        '#type' =&gt; 'textfield',
        '#required'=&gt;true,
        '#value'=&gt;t($row-&gt;open_time),
        '#title' =&gt; t('Enter Tournament Start Time'),
        '#size'=&gt;40,
        '#maxlength'=&gt;128,
        '#weight'=&gt;3,
        '#description' =&gt; t('Booking open time.'),
        );
  $form['close_time'] = array(
        '#type' =&gt; 'textfield',
        '#required'=&gt;true,
        '#value'=&gt; t($row-&gt;close_time),
        '#title' =&gt; t('Booking close time'),
        '#size'=&gt;40,
        '#maxlength'=&gt;128,
        '#weight'=&gt;4,
        '#description' =&gt; t('Booking close time.'),
        );
  
  $form['submit'] = array(
        '#type' =&gt; 'submit',
        '#value' =&gt; t('Update Tournament'),
        '#weight'=&gt;5
       );
  }
  return $form;
  }
  </code></pre>