title: Get value in looping, send to another page and call catch data using that value
body: <p>I use session to send that value to other page, but mysql syntax does not display the data using that value. It doesnt show the error on MySQL syntax. Can someone help me? and Explain why mysql syntax cannot read the session? or I need to assign new variable for session on the pakejlist.php page?</p>
  
  <p>the value already call from DB and display on A HREF link on <strong>food.php</strong> , i want to get that value on pakejlist.php mysql syntax.</p>
  
  <p>and what I achieve is nothing.. the syntax just fine but the data doesnt came out. </p>
  
  <pre><code>//food.php
  &lt;?php include("../kahwin/Connections/conn.php"); ?&gt;
  
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Kahwin Ringkas&lt;/title&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
      &lt;link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;nav class="navbar navbar-inverse"&gt;
    &lt;div class="container-fluid"&gt;
      &lt;div class="navbar-header"&gt;
        &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;                        
        &lt;/button&gt;
        &lt;a class="navbar-brand" href="/kahwin/index.php"&gt;Walimatul Urus&lt;/a&gt;
      &lt;/div&gt;
      &lt;div class="collapse navbar-collapse" id="myNavbar"&gt;
        &lt;ul class="nav navbar-nav navbar-right"&gt;
          &lt;li&gt;&lt;a href="#"&gt;&lt;span class="glyphicon glyphicon-log-in"&gt;&lt;/span&gt; Login&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/nav&gt;
  
  &lt;div class="container"&gt;  
  &lt;div class="page-header"&gt;
    &lt;h1&gt;Carian Katering&lt;/h1&gt;
  &lt;/div&gt;
  
    &lt;?php
      session_start();
      $_SESSION['id'] = $row['v_id'];
      mysql_select_db($database_conn, $conn);
      $sql = mysql_query("SELECT * FROM vendor WHERE type = 'Katering'") or die (mysql_error());
      while ($row = mysql_fetch_array($sql)) {
    ?&gt;
      &lt;div class="col-md-4"&gt;
        &lt;?php echo '&lt;img src="data:image;base64, '.$row['img'].'" class="img-thumbnail"&gt;' ?&gt;
        &lt;h4&gt;&lt;?php echo $row['companyName']?&gt;&lt;/h4&gt;
        &lt;p&gt;&lt;?php echo $row['address']?&gt;, &lt;?php echo $row['code']?&gt; &lt;?php echo $row['city']?&gt;, &lt;?php echo $row['state']?&gt;&lt;br&gt;&lt;?php echo $row['contact']?&gt;&lt;br&gt;&lt;?php echo $row['email']?&gt;&lt;br&gt;&lt;/p&gt;
        &lt;a href="pakejlist.php" value="&lt;?php echo $row['v_id']?&gt;"&gt;View Package&lt;/a&gt;&lt;br&gt;
      &lt;/div&gt;
      &lt;?php }
      ?&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  
  
  
          //pakejlist.php
  
  
      &lt;?php include("../kahwin/Connections/conn.php"); ?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Kahwin Ringkas&lt;/title&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
      &lt;link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;nav class="navbar navbar-inverse"&gt;
    &lt;div class="container-fluid"&gt;
      &lt;div class="navbar-header"&gt;
        &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;                        
        &lt;/button&gt;
        &lt;a class="navbar-brand" href="/kahwin/index.php"&gt;Walimatul Urus&lt;/a&gt;
      &lt;/div&gt;
      &lt;div class="collapse navbar-collapse" id="myNavbar"&gt;
        &lt;ul class="nav navbar-nav navbar-right"&gt;
          &lt;li&gt;&lt;a href="#"&gt;&lt;span class="glyphicon glyphicon-log-in"&gt;&lt;/span&gt; Login&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/nav&gt;
  
  &lt;!-- Page Content --&gt;
      &lt;div class="container"&gt;
  
          &lt;!-- Page Heading --&gt;
          &lt;div class="row"&gt;
              &lt;div class="col-lg-12"&gt;
                  &lt;h1 class="page-header"&gt;Senarai Pakej&lt;/h1&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;!-- /.row --&gt;
  
          &lt;!-- Project One --&gt;
          &lt;?php
              //$vid = $_REQUEST['id'];
              session_start();
              mysql_select_db($database_conn, $conn);
              $sql = mysql_query("SELECT * FROM pakej WHERE v_id = '" .$_SESSION['id']. "' ") or die (mysql_error());
              while ($result = mysql_fetch_array($sql)) {
          ?&gt;
          &lt;div class="row"&gt;
              &lt;div class="col-md-6"&gt;
                  &lt;h3&gt;&lt;?php echo $result['name_p']?&gt;&lt;/h3&gt;
                  &lt;h4&gt;$ &lt;?php echo $result['harga']?&gt;&lt;/h4&gt;
                  &lt;p&gt;&lt;?php echo $result['descr']?&gt;&lt;/p&gt;
                  &lt;a class="btn btn-primary" href="#"&gt;Add to cart &lt;span class="glyphicon glyphicon-chevron-right"&gt;&lt;/span&gt;&lt;/a&gt;
              &lt;/div&gt;
              &lt;div class="col-md-5"&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;?php }
          ?&gt;
          &lt;!-- /.row --&gt;
  
          &lt;hr&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>