<form action='send_email.php' method='post'>
<table border='1' cellspacing='0' cellpadding='6'>
<?php
$query = "SELECT * FROM projects";
$result = mysql_query($query) or die ("Couldn't execute query.");
$numofrows = mysql_num_rows($result);
for($i = 0; $i < $numofrows; $i++) {
$row = mysql_fetch_array($result);
echo"<tr>";
echo"<td>
<input name='projectid' type='text' value='".$row['projectid']."' size='22'>
<input name='project' type='text' value='".$row['project']."' size='22'>
<input type='submit' name='button' id='button' value='Submit' /></td>
";
}
echo"</tr>";
?>
</table>
</form>
-----
send_email.php
Projectid: <?php echo $_POST["projectid"]; ?><br />
Project: <?php echo $_POST["project"]; ?>
results are always now matter which button on click on to next to the row.
Projectid: 7
Project: szdsadfg
|