Delete/Edit selected record from rendered tabular form results I have made a form and retrive form submissions into a tabular format. I put 2 links ahead every single submission - Edit/Delete

Now, when I click "edit", its corresponding edit form should open. Similarly, when I click "delete", that particular entry should get delete from database.

I know it's pretty simple doing in php, but don't know how should i do in Drupal.
Please help.

Some code that I practiced: first I created a menu to show results of my form.

$items[MID_MENU_PARENT . '/component/show'] = array(
    'title' =&gt; 'Component List',
    'description' =&gt; t('Records'),
    'page callback' =&gt; 'component_list',
    'access arguments' =&gt; array('administer site configuration'),
    'file'=&gt;'component_list.inc',
  );

/**
   * My callback function
**/
  function component_list(){
       $query = db_select('mid_components', 'n')
               -&gt;fields('n')
               -&gt;execute();
       $rows = array();
       while($data = $query-&gt;fetchAssoc()){
      // Fill the table rows
       $data['operation'] = l(t('Delete'), 'admin/mid-modules/component' . $data['cid'] . '/delete');
       $data['operation'] .= "|";
       $data['operation'] .= l(t('Edit'), 'admin/mid-modules/component' . $data['cid'] . '/edit');
       $rows[] = array('data' =&gt; $data, 'style' =&gt; 'word-break:break-all;',);
  }

 // Prepare table header
  $header = array( t('S.No'),t('Component Name'));
  // Output of table with the paging
   $output = theme_table(
     array(
           "header" =&gt; $header,
           "rows" =&gt; $rows,
           "attributes" =&gt; array(),
           "sticky" =&gt; true, // Table header will be sticky
           "caption" =&gt; "",
           "colgroups" =&gt; array(),
           "empty" =&gt; t("Table has no row!") // The message to be displayed if table is empty
         )
      );
  return $output;
}

 /**
   * Menu href to edir particular entry
 **/
    $items[MID_MENU_PARENT . '/component/%show/edit'] = array(
          'title' =&gt; 'Edit Component item',
          'page callback' =&gt; 'component_list_edit',
          'page arguments' =&gt; array(3),
          'access arguments' =&gt; array('administer users'),
          'type' =&gt; MENU_CALLBACK,
     );
Not sure what your real question is (there is no "question" in your question ...), so consider editing your question to make that clear.

But I would give it a try to add a / in front of the 2 (similar) lines containing admin/mid-modules/component (so that they are changed to /admin/mid-modules/component). So both for the "delete" and the "edit".