Use redirect after content creating and use $node I modified my submit handler to be redirected to a "thank you" page after creating some content. So far so good.

But I want to use some data of the node just created, so how can I transfer the $node-data of the just created node to my thank you page?

I created a new block to be shown only on the thank you page and I want to show some $node-data in my block...

function mymodule_block_view($delta = '') {
  switch ($delta) {
    case 'your_block':
      $block['subject'] = 'Share by mail';
      $block['content'] = mymodule_sharebutton();
      break;
  }

  return $block;
}


function mymodule_sharebutton() {
  $output = '&lt;a href=""&gt;share&lt;/a&gt;';

  return $output;
}


I already tried with passing $node, $form, $form_state,... but with no luck.
Use arg(1); - (nid of the current node) in the hook_block_view and pass it in the link

function mymodule_block_view($delta = '') {
  switch ($delta) {
    case 'your_block':
      $nid = arg(1);
      $block['subject'] = 'Share by mail';
      $block['content'] = '&lt;a href=""&gt;share?nid='.$nid.'&lt;/a&gt;';
      break;
  }
  return $block;
}


Once you do that, you can make your thank_you page react on the nid argument by loading the node: 

$node = node_load($nid);


and extracting from it whatever you need