title: How to pass php variable value to div's iframe using href
body: <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
  $query="SELECT * FROM `notification` where `Status`='1'  &amp;&amp; `ownerid`='$userid' ";
  $result = mysql_query($query);
  $count=0;
  while($row=mysql_fetch_array($result))
  {
  $nid=$row['notifid'];
  
  $pr="select * from `Swap` where `notifid`='$nid'";
  $prm=mysql_query($pr);
  $prow=mysql_fetch_assoc($prm);
  $rid=$prow['Requesterid'];
  
  $query1="select * from `myuser` where `Userid`='$rid'";
  //echo $query1;
  $result1=mysql_query($query1);
  $row1=mysql_fetch_assoc($result1);
  $rname=$row1['Firstname'];
  //echo $rname;
  ?&gt;
  
  &lt;div style="width:100%; background: rgb(228, 228, 228);margin: 20px;padding: 20px;"&gt;
  &lt;h1&gt;A New Swapping Request from &lt;?php echo $rname; ?&gt;&lt;/h1&gt;
  Your sweater is choose for swapping.....you want to give permission?? 
    &lt;div onclick="clicked(this);" id="&lt;?php echo $nid; ?&gt;"&gt;VIEW REQUEST&lt;/div&gt;
  &lt;/div&gt;
  &lt;?php
  $count++;
  }
  ?&gt;
    &lt;div id="light" class="white_content" style="  height: auto;"&gt;
      &lt;a href = "javascript:void(0)" style="background: #EAEAEA; padding: 5px 7px; color: #000; float: right;" onclick="confirmno()"&gt;X&lt;/a&gt;
        &lt;script type="text/javascript" src="js/jquery-1.4.2.min.js"&gt;&lt;/script&gt;
  
    &lt;script type="text/javascript"&gt;
     function clicked(item) {
       document.getElementById('light').style.display='block';
       document.getElementById('fade').style.display='block';
       var a = $(item).attr("id");
     }
    &lt;/script&gt;            
  &lt;div id="stylized" class="myform"&gt;
   &lt;iframe width="100%" height="400px" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="confirmed.php?x="+a&gt; &lt;/iframe&gt;  
    &lt;/div&gt;
  
   &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>hi,
  here i want to pass unique php variable via href/anything else into  for i frame src to pass.after see numbers of tutorials i get the value of $nid in $(item).attr("id"); but how to pass this value to  i try u can see in my code..but its not working plz help</p>