title: Pass an id through the url in php codeigniter
body: <p>I am trying to pass the page id through the url Here is my code,problem is i will not get the required page id to the page only get the path . Please help.
  View Page</p>
  
  <pre><code>&lt;li&gt;
  &lt;a href="view/page_id=$page_id"&gt;&lt;i class="fa fa-table fa-fw"&gt;&lt;/i&gt;Hotel 1&lt;/a&gt;        
  &lt;/li&gt;
  &lt;li&gt;
  &lt;a href="view1/page_id=$page_id"&gt;&lt;i class="fa fa-table fa-fw"&gt;&lt;/i&gt;Hotel 2&lt;/a&gt;                            
  &lt;/li&gt;
  </code></pre>
  
  <p>Controller Page</p>
  
  <pre><code>public function view()
  {
  echo $page_id =$this-&gt;uri-&gt;segment(1); 
  $this-&gt;load-&gt;helper('url');
  $data['offers_name'] = $this-&gt;Login_set-&gt;get_offer($id);
  $data['offers_description'] = $data['offers_name']['offers_description'];
  $this-&gt;load-&gt;view('App_stay/pages/hotel1_offers.php');
  } 
  public function view1()
  {
  echo $page_id =$this-&gt;uri-&gt;segment(2);
  $this-&gt;load-&gt;helper('url');
  $data['offers_name'] = $this-&gt;Login_set-&gt;get_offer($id);
  $data['offers_description'] = $data['offers_name']['offers_description'];
  $this-&gt;load-&gt;view('App_stay/pages/hotel2_offers.php');
  }
  </code></pre>