sure here it is 🙂
echo " <FORM method=\"POST\" action=\"aps.php\">\n";
echo " <tr>\n";
echo" <td width=\"65%\"><b>Pilot For Plane ID:</b></td>\n";
echo " <td VALIGN=\"MIDDLE\">\n";
echo " <select name=\"sel_user\" STYLE=\"WIDTH:100%;\">\n";
echo " <option value=\"\"> -- Select a Pilot -- </option>\n";
$sql = "SELECT callsign
from 873wing ";
$sql_result = mysql_query($sql)
or die("Couldn't execute query.");
while ($row = mysql_fetch_array($sql_result)){
$callsign = $row ["callsign"];
echo " <option value=\"$callsign\">$callsign</option>";
}
echo " </select>\n";
echo " </td>\n";
echo" <tr> \n";
echo" <td width=\"65%\">Assign Plane Id :</td>\n";
echo " <td VALIGN=\"MIDDLE\">\n";
echo " <select name=\"sel_aps\" STYLE=\"WIDTH:100%;\">\n";
echo " <option value=\"\"> -- Select -- </option>\n";
$sql = "SELECT planeid
from serial";
$sql_result = mysql_query($sql)
or die("Couldn't execute query.");
while ($row = mysql_fetch_array($sql_result)){
$planeid = $row ["planeid"];
echo " <option value=\"$planeid\">$planeid</option>";
}
echo " </select>\n";
echo " </td>\n";
echo " </tr>\n";
echo" <tr> \n";
echo "<td width=\"50%\"><INPUT type=submit value=\"Assign\"></td>";
echo " </tr>\n";
echo " <tr>\n";
echo " </form>\n";
this goes to here
<?PHP // Try to use the full <?PHP tag, can cause some problems on some systems
include("conf.php");
if (!$sel_user || !$sel_aps) {
header("Location: modify.php");
exit;
}
/* Start The Content on the Page ----------------------------------------------------- */
$sql = "SELECT planeid FROM serial WHERE planeid= $sel_aps";
include("conf.php");
$sql_result = mysql_query($sql) or die(mysql_error());
if (!$sql_result) {
echo "<P>Couldn't get item!";
} else {
$row = mysql_fetch_array($sql_result);
$planeid = $row ["planeid"];
$callsign = $row ["callsign"];
echo "<table BORDER=\"1\" ALIGN=\"CENTER\" cellspacing=\"4\" cellpadding=\"4\">\n";
echo " <FORM method=\"POST\" action=\"aps2.php\">\n";
echo " <tr>\n";
echo " <td align=center COLSPAN=\"3\">\n";
echo " <H3>You have selected to Assign <br><font size=5 color=#FF0000> $sel_user</H3></font></td>\n";
echo " <INPUT TYPE=\"HIDDEN\" NAME=\"callsign\" VALUE=\"$sel_user\">\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td valign=MIDDLE>\n";
echo " <strong>Assigned serial #:</strong></td>\n";
echo " <td VALIGN=\"MIDDLE\">\n";
echo " <INPUT type=\"text\" name=\"serial\" value=\"$sel_aps\" size=8 maxlength=8></TD>\n";
echo " <tr>\n";
echo " <td valign=MIDDLE ALIGN=\"CENTER\" COLSPAN=\"2\">\n";
echo " <INPUT type=\"submit\" value=\"Assign Plane ID\"></td>\n";
echo " </tr>\n";
echo " </FORM>\n";
echo "</table>\n";
}
?>
then the last page which is the one i'am having the problem with
<?
$sql = "INSERT INTO 873wing ( plane_serial ) value ($sel_aps)";
$sql_result = mysql_query($sql) or die(mysql_error());
$sql = "DELETE FROM serial WHERE column = $planeid";
$sql_result = mysql_query($sql) or die(mysql_error());
include("conf.php");
$sql_result = mysql_query($sql) or die(mysql_error());
if (!$sql_result) {
echo "<P>Couldn't modify record!";
} else {
echo "
<h3><p align=Center>The following modifications have been made:</p></h3>
<table cellspacing=5 cellpadding=5 align=center>
<tr>
<td valign=center><strong>Callsign:</strong></td>
<td valign=center>$callsign</td>
</tr>
<tr>
<td valign=center><strong>Has been assingned:</strong></td>
<td valign=center>$plane_serial</td>
</tr>
</table>
</p>
<p align=center><a href=modify.php> logistics page </p></a>
<p align=center><a href=log.php>873rd Logbook</p></a>
";
}
?>
thanks for helping me out here