title: Get Product ID throught url in Custom page?
body: <p>I've got this problem that I can't solve. Partly because I can't explain it with the right terms. I'm new to this so sorry for this clumsy question.</p>
  
  <p>Below you can see an overview of my goal.</p>
  
  <p>i created one custom module in my magento,Its working great.</p>
  
  <p>Using this i created that one <a href="http://www.phparrow.com/magento/magento-create-a-simple-module/" rel="nofollow noreferrer">http://www.phparrow.com/magento/magento-create-a-simple-module/</a></p>
  
  <p>in my product page i have a link </p>
  
  <p><code>&lt;a href = "http://www.example.com/magenaresh/index.php/hello/ "&gt; Click Here &lt;/a&gt;</code></p>
  
  <p>when i click <strong>Click Here</strong> its redirecting to <strong><a href="http://www.example.com/magenaresh/index.php/hello/" rel="nofollow noreferrer">http://www.example.com/magenaresh/index.php/hello/</a></strong> this URL upto here every thing is ok...</p>
  
  <p>But now i want to pass the ProductID along with URL</p>
  
  <p>for this i wrote like this </p>
  
  <pre><code>&lt;?php 
      $product_id = $this-&gt;getProduct()-&gt;getId();
      echo $product_id;
  ?&gt;
  </code></pre>
  
  <p>AND </p>
  
  <pre><code>&lt;a href = "http://www.example.com/magenaresh/index.php/hello/&lt;?php echo $product_id ?&gt; "&gt;Click Here&lt;/a&gt;
  </code></pre>
  
  <p>again i clicked on <code>Click Here</code> its showing </p>
  
  <p><img src="https://i.stack.imgur.com/gJTHI.png" alt="enter image description here"></p>
  
  <p>Any thing wrong i did here ?</p>
  
  <p>Any Ideas ?</p>