<?php
$query = "SELECT * FROM projects , client , zone WHERE projects.clientid = client.clientid AND projects.zoneid = zone.zoneid";
$result = mysql_query($query) or die ("Couldn't execute query.");
while ($row = mysql_fetch_assoc($result))
{
echo '<tr>';
echo '<td>';
echo '<form action="send_email.php" method="post">';
echo '<input name="projectid" type="hidden" value="' . $row['projectid'] . '" size="3" />';
$get = "SELECT clientid,company FROM client ORDER BY company ASC";
// prepares the information //
$answer = mysql_query($get)
// Kills process if the information cant be extracted //
or die ("Couldn't execute query.");
echo "<select name='clientid' class='gradientform'>\n";
while ($info = mysql_fetch_array($answer))
{
extract($info);
echo " <option value='$clientid'>$company\n";
}
echo " </select>\n";
echo '<input name="company" type="text" value="' . $row['company'] . '" size="22" />';
echo '<input name="project" type="text" value="' . $row['project'] . '" size="22" />';
echo '<input name="button" type="submit" id="button" value="Submit" />';
echo '</form>';
echo '</td>';
echo '</tr>';
}
?>
|