Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to pass value of a row to another page in AJAX
    primarykey
    data
    text
    <p>I am having a table with 7 columns(Complaintid id,name,school name etc...) and also have button. When I click the button I need to pass the complaintid of that row to another page. pls help me find a way to pass the value.</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;?php include '../library/dbconnect.php'; $query="SELECT * FROM Complaint_register WHERE status=1 ORDER BY entrydate "; $result=mysql_query($query) or die("Selection query of Complaint_register is Error ".mysql_error()); $num = mysql_numrows($result); $i=0; $j=1; ?&gt; &lt;form action="" name="frmcomplaint" id="frmcomplaint" method="post"&gt; &lt;table border="1" style="border-color: #FFFFFF;" &gt; &lt;tr&gt; &lt;th style="color: #FF0000"&gt;Sl. No&lt;/th&gt; &lt;th style="color: #FF0000"&gt;Complaint Id&lt;/th&gt; &lt;th style="color: #FF0000"&gt;Date&lt;/th&gt; &lt;th style="color: #FF0000; width:200px;" &gt;Name Of student&lt;/th&gt; &lt;th style="color: #FF0000"&gt;District&lt;/th&gt; &lt;th style="color: #FF0000"&gt;School Name&lt;/th&gt; &lt;th style="color: #FF0000"&gt;Standard with &lt;/th&gt; &lt;th style="color: #FF0000; width:200px;"&gt;Complaint&lt;/th&gt; &lt;/tr&gt; &lt;?php while($row=mysql_fetch_array($result)) { $date1=explode('-', $row[$i+2]); $entrydate=$date1[2]."-".$date1[1]."-".$date1[0]; $job_id=$row[$i+1]; ?&gt; &lt;tr&gt; &lt;td style="color: #000000"&gt;&lt;?php echo $j;?&gt;&lt;/td&gt; &lt;td style="color: #000000"&gt;&lt;?php echo $row[complain_Id]; ?&gt; &lt;/td&gt; &lt;td style="color: #000000"&gt;&lt;?php echo $entrydate;?&gt;&lt;/td&gt; &lt;td style="color: #000000" &gt;&lt;?php echo $row[studname];?&gt;&lt;/td&gt; &lt;td style="color: #000000"&gt;&lt;?php echo $row[District];?&gt;&lt;/td&gt; &lt;td style="color: #000000"&gt;&lt;?php echo $row[School_name] ;?&gt;&lt;/td&gt; &lt;td style="color: #000000"&gt;&lt;?php echo $row[Standard]."-".$row[Division];?&gt;&lt;/td&gt; &lt;td id="disp" &gt;&lt;?php echo $row[Complaint];?&gt;&lt;/td&gt; &lt;td id="button" name="viewbutton" &gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php $button++; $j=$j+1; } ?&gt; &lt;/table&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload