Edit: After receiving some help, I edited some parts and here formlarigor2.php file and I got new error says 1)mysqli_stmt_bind_result() expects at least 2 parameters, 1 given.... 2)mysqli_fetch_array() expects parameter 1 to be mysqli_result, object given in C.. I want to layout the page like given.
That's why I used td> codes.. Any help? :`
<?php
$conn = mysqli_connect("localhost","root","","son_fbe");
if (mysqli_connect_error()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
exit();
}
$formid = isset($_GET['formid ']) ? $_GET['formid '] : '';
if ($stmt = mysqli_prepare($conn, "SELECT * FROM derssaydirma WHERE formid = ?")) {
mysqli_stmt_bind_param($stmt, "s", $formid );
mysqli_stmt_execute($stmt);
mysqli_stmt_bind_result($stmt);
}
?>
<!DOCTYPE html>
<html lang="en">
<head> <title></title> </head>
<body> <table align="center" bordercolor="#CCCCCC" border="1" >
<?php
$i=0;
while($row = mysqli_fetch_array($stmt)) {
if($i%2==0)
$classname="even";
else
$classname="odd";
?>
<tr class="<?php if(isset($classname)) echo $classname;?>">
<td width="235">Form ID</td>
<td width="299"><?php echo $row["formid"]; ?></td>
</tr>
<tr class="<?php if(isset($classname)) echo $classname;?>">
<td>O_AdiSoyadi</td>
<td><?php echo $row["O_AdiSoyadi"]; ?></td>
</tr>
<tr class="<?php if(isset($classname)) echo $classname;?>">
<td>OgrenciNo</td>
<td><?php echo $row["OgrenciNo"]; ?></td>
</tr>
<tr class="<?php if(isset($classname)) echo $classname;?>">
<td>Program_BaslanilanDonem</td>
<td><?php echo $row["Program_BaslanilanDonem"]; ?></td>
</tr>
//There are about 20 more like this code block( <tr></tr> <?php
$i++;
}
?>
</table>
`
I have a table that consists of more than 25 columns. There is a page that shows forms waiting for approval. In that form, I do not show all columns instead I show only a few. I do that using PHP code. Here my code.
There is a part that says see all submitted forms and go to that forms. I am able to see all submitted ones however I could not see the specific row. For example, the table displays formid, name and etc, I want to get information of formid's 2. How can I do that? `
