[56K WARN] error displaying variables

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Curtis782
Forum Commoner
Posts: 31
Joined: Tue Oct 25, 2005 3:34 pm

[56K WARN] error displaying variables

Post by Curtis782 »

I have an add.php form that sends variables to a MySQL DB. The variables are sent correctly but when I pull the variables through my modify.php script I have 3 fields that pull the field name/id versus the data from the database. The echo variable code is correct and consistent with functional variable echo statements. I thought it might have been an issue with my INSERT INTO <tableName> ... query but this is not the case. The order of variables passed through the INSERT into query are consistent in both add.php and modify.php.

Does the order of variables passed through the INSERT INTO query need to be consistent with the order of my MySQL DB fields (in the actual database)? I am seeing they are slightly different when viewing the structure in phpMyAdmin but this has not caused a problem with my prior scripting (to the best of my memory).

Screenshot:
Image
dyonak
Forum Commoner
Posts: 56
Joined: Wed Jun 22, 2005 10:22 am
Location: Minneapolis, MN
Contact:

Post by dyonak »

It looks like you are forgetting the $ to indicate a variable call. For example. .

Instead of:

Code: Select all

echo "dateSubmitted"
You should try:

Code: Select all

echo "$dateSubmitted"
This would output what you are seeing, if you are sure this portion of code is correct I'm not sure what it is. The order they are called from the DB shouldn't matter. Post your code if you can please.
Curtis782
Forum Commoner
Posts: 31
Joined: Tue Oct 25, 2005 3:34 pm

Post by Curtis782 »

Here is my code from modify.php...

Code: Select all

<html>
<head>
<title>Work Order System</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script language="JavaScript" src="script1.js"></script>
<SCRIPT LANGUAGE="JavaScript">
<!-- Idea by:  Nic Wolfe (Nic@TimelapseProductions.com) -->
<!-- Web URL:  http://fineline.xs.mw -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,width=400,height=300');");
}
// End -->
</script>
</head>

<body>

<?php

include ("common_vars.php");

$page_width = "840";
$inside_width = "800";

$current_date = date('Y-m-d');
if($update)
        {
        $link = mysql_connect("$DB_HOSTNAME1", "$DB_USERNAME1", "$DB_PASSWORD1");
        mysql_select_db("$DB_NAME1");
        $query = "UPDATE $DB_TABLE1 SET status='$status',customer='$customer',customerType='$customerType',salesRep='$salesRep',shipDateMonth='$shipDateMonth',
shipDateDay='$shipDateDay',shipDateYear='$shipDateYear',creditCard='$creditCard',
partNo1='$partNo1',qty1='$qty1',desc1='$desc1',condition1='$condition1',location1='$location1',received1='$received1',
partNo2='$partNo2',qty2='$qty2',desc2='$desc2',condition2='$condition2',location2='$location2',received2='$received2',
partNo3='$partNo3',qty3='$qty3',desc3='$desc3',condition3='$condition3',location3='$location3',received3='$received3',
partNo4='$partNo4',qty4='$qty4',desc4='$desc4',condition4='$condition4',location4='$location4',received4='$received4',
partNo5='$partNo5',qty5='$qty5',desc5='$desc5',condition5='$condition5',location5='$location5',received5='$received5',
partNo6='$partNo6',qty6='$qty6',desc6='$desc6',condition6='$condition6',location6='$location6',received6='$received6',
partNo7='$partNo7',qty7='$qty7',desc7='$desc7',condition7='$condition7',location7='$location7',received7='$received7',
partNo8='$partNo8',qty8='$qty8',desc8='$desc8',condition8='$condition8',location8='$location8',received8='$received8',
partNo9='$partNo9',qty9='$qty9',desc9='$desc9',condition9='$condition9',location9='$location9',received9='$received9',
partNo10='$partNo10',qty10='$qty10',desc10='$desc10',condition10='$condition10',location10='$location10',received10='$received10',
partNo11='$partNo11',qty11='$qty11',desc11='$desc11',condition11='$condition11',location11='$location11',received11='$received11',
partNo12='$partNo12',qty12='$qty12',desc12='$desc12',condition12='$condition12',location12='$location12',received12='$received12',
partNo13='$partNo13',qty13='$qty13',desc13='$desc13',condition13='$condition13',location13='$location13',received13='$received13',
partNo14='$partNo14',qty14='$qty14',desc14='$desc14',condition14='$condition14',location14='$location14',received14='$received14',
partNo15='$partNo15',qty15='$qty15',desc15='$desc15',condition15='$condition15',location15='$location15',received15='$received15',
testedBy='$testedBy',notes='$notes',finalSystemConfig='$finalSystemConfig',shippingInfo='$shippingInfo',signOffPerson='$signOffPerson',
shippingConfirmation='$shippingConfirmation',invoiceNum='invoiceNum',dateSubmitted='dateSubmitted',customerPONum='customerPONum' WHERE id='$id'";
		$result = mysql_query($query);
		print mysql_error();
?>

<div align="center">
<table border="0" cellspacing="0" cellpadding="0" width="<?php echo "$page_width"; ?>" align="center">
<tr>
   <td width="<?php echo "$page_width"; ?>" colspan="7" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="<?php echo "$page_width"; ?>" height="1"></td>
</tr>
<tr>
   <td width="1" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="1" height="119"></td>
   <td width="15" align="left" valign="top"><img src="http://www.domainname.com/images/1x1_transparent.gif" width="1" height="1"></td>
   <td width="140" valign="top"><img src="http://www.domainname.com/images/logo_140x38.gif" width="140" height="38" style="margin-top:15px;">
<div class="loggedIn" style="margin-top:15px;">You are currently<br>logged in as: <strong><?php $wo_user=$_SERVER['PHP_AUTH_USER']; echo $wo_user; ?></strong></div></td>
   <td width="<?php echo "$page_width - 312"; ?>" align="center" valign="middle"><span class="header">Internal Work Order System</span><br>
     <span class="subHeader" style="margin-top:5px;">Version 1.0 BETA</span></td>
   <td width="55" align="left" valign="top"><img src="http://www.domainname.com/images/1x1_transparent.gif" width="1" height="1"></td>
   <td width="100" align="right"><img src="http://www.domainname.com/images/woman_phone3.jpg" width="97" height="119"></td>
   <td width="1" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="1" height="119"></td>
</tr>
</table>
</div>

<div align="center">
<table border="0" cellspacing="0" cellpadding="0" width="<?php echo "$page_width"; ?>" align="center">
<tr>
   <td width="<?php echo "$page_width"; ?>" colspan="3" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="<?php echo "$page_width"; ?>" height="1"></td>
</tr>
<tr>
   <td width="1" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="1" height="25"></td>
   <td width="<?php echo "$page_width - 2"; ?>" align="center" valign="middle" style="padding-left:10px;padding-right:10px;" class="navLink"><a href="add.php" class="navLink">new work order</a> | <a href="search.php" class="navLink">search work orders</a> | <a href="view_all.php" class="navLink">view all</a></td>
   <td width="1" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="1" height="25"></td>
</tr>
<tr>
   <td width="<?php echo "$page_width"; ?>" colspan="3" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="<?php echo "$page_width"; ?>" height="1"></td>
</tr>
</table>
</div>

<div align="center"><table border="0" cellspacing="0" cellpadding="0" width="<?php echo "$page_width"; ?>" align="center">
<tr><td width="1" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="1"></td>
   <td width="<?php echo "$page_width - 2"; ?>" style="padding-left:10px;padding-right:10px;padding-top:60px;padding-bottom:60px;">
   <div style="font-family:Verdana, Arial, Helvetica, sans-serif;font-size:14px;color:#990000;font-weight:bold;" align="center">Work Order Successfully Updated!</div><br><br>
   <div align="center" class="style9"><a href="view_all.php" class="style9">View Work Orders</a></div></td>
   <td width="1" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="1"></td>
</tr>
</table></div>
<div align="center"><img src="http://www.domainname.com/images/1x1_gray.gif" width="<?php echo "$page_width"; ?>" height="1"></div>

<?php
        }

else if($submit)

        {
        $link = mysql_connect("$DB_HOSTNAME1", "$DB_USERNAME1", "$DB_PASSWORD1");
        mysql_select_db("$DB_NAME1");
        $query = "INSERT INTO $DB_TABLE1 (status,customer,customerType,salesRep,shipDateMonth,shipDateDay,shipDateYear,creditCard,
partNo1,qty1,desc1,condition1,location1,received1,partNo2,qty2,desc2,condition2,location2,received2,partNo3,qty3,desc3,condition3,location3,received3,
partNo4,qty4,desc4,condition4,location4,received4,partNo5,qty5,desc5,condition5,location5,received5,partNo6,qty6,desc6,condition6,location6,received6,
partNo7,qty7,desc7,condition7,location7,received7,partNo8,qty8,desc8,condition8,location8,received8,partNo9,qty9,desc9,condition9,location9,received9,
partNo10,qty10,desc10,condition10,location10,received10,partNo11,qty11,desc11,condition11,location11,received11,partNo12,qty12,desc12,condition12,location12,received12,
partNo13,qty13,desc13,condition13,location13,received13,partNo14,qty14,desc14,condition14,location14,received14,partNo15,qty15,desc15,condition15,location15,received15,
testedBy,notes,finalSystemConfig,shippingInfo,signOffPerson,shippingConfirmation,invoiceNum,dateSubmitted,customerPONum) VALUES ('$status','$customer','$customerType','$salesRep',
'$shipDateMonth','$shipDateDay','$shipDateYear','$creditCard',
'$partNo1','$qty1','$desc1','$condition1','$location1','$received1','$partNo2','$qty2','$desc2','$condition2','$location2','$received2',
'$partNo3','$qty3','$desc3','$condition3','$location3','$received3','$partNo4','$qty4','$desc4','$condition4','$location4','$received4',
'$partNo5','$qty5','$desc5','$condition5','$location5','$received5','$partNo6','$qty6','$desc6','$condition6','$location6','$received6',
'$partNo7','$qty7','$desc7','$condition7','$location7','$received7','$partNo8','$qty8','$desc8','$condition8','$location8','$received8',
'$partNo9','$qty9','$desc9','$condition9','$location9','$received9','$partNo10','$qty10','$desc10','$condition10','$location10','$received10',
'$partNo11','$qty11','$desc11','$condition11','$location11','$received11','$partNo12','$qty12','$desc12','$condition12','$location12','$received12',
'$partNo13','$qty13','$desc13','$condition13','$location13','$received13','$partNo14','$qty14','$desc14','$condition14','$location14','$received14',
'$partNo15','$qty15','$desc15','$condition15','$location15','$received15','$testedBy','$notes','$finalSystemConfig','$shippingInfo','$signOffPerson',
'$shippingConfirmation','$invoiceNum','$dateSubmitted','$customerPONum')";

        $result = mysql_query($query);
		$record_id = mysql_insert_id();

		// this section prints record details to the screen after a record is submitted
		echo "<br><br><br><br>";
		echo "<div align=center>";
		echo "Your information has been submitted, thank you!<br><br>";
		echo "To view your profile, please click on the link below:<br>";
		echo "<a href=\"$BASE_URL/view.php?id=$record_id\">$BASE_URL/view.php?id=$record_id</a>";
		echo "<br><br>";
		echo "Optionally, you can return to our home page by <a href=\"$BASE_URL\">clicking here</a>.";
		echo "</div>";
        }

else if($id)
        {
        $link = mysql_connect("$DB_HOSTNAME1", "$DB_USERNAME1", "$DB_PASSWORD1");
        mysql_select_db("$DB_NAME1");
        $query = "SELECT * FROM $DB_TABLE1 WHERE id=$id";
        $result = mysql_query($query);
		print mysql_error();
        $myrow = mysql_fetch_array($result);
		$wo_user = $_SERVER['PHP_AUTH_USER'];

		if ($wo_user == "keith") { $rep = "Keith"; }
		else if ($wo_user == "dottie") { $rep = "Dottie"; }
		else if ($wo_user == "damian") { $rep = "Damian"; }
		else if ($wo_user == "mark") { $rep = "Mark"; }
		else if ($wo_user == "dan") { $rep = "Dan"; }
		else if ($wo_user == "chuck") { $rep = "Charles"; }
		else if ($wo_user == "tom") { $rep = "Tom"; }
		else if ($wo_user == "bill") { $rep = "Bill"; }
		else if ($wo_user == "curtis") { $rep = "Curtis"; }

		if (($myrow["salesRep"] <> $rep) AND ($wo_user <> "curtis") AND ($wo_user <> "bill") AND ($wo_user <> "tom"))
		{

		?>

<div align="center">
<table border="0" cellspacing="0" cellpadding="0" width="<?php echo "$page_width"; ?>" align="center">
<tr>
   <td width="<?php echo "$page_width"; ?>" colspan="7" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="<?php echo "$page_width"; ?>" height="1"></td>
</tr>
<tr>
   <td width="1" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="1" height="119"></td>
   <td width="15" align="left" valign="top"><img src="http://www.domainname.com/images/1x1_transparent.gif" width="1" height="1"></td>
   <td width="140" valign="top"><img src="http://www.domainname.com/images/logo_140x38.gif" width="140" height="38" style="margin-top:15px;"><div class="loggedIn" style="margin-top:15px;">You are currently<br>logged in as: <strong><?php $wo_user=$_SERVER['PHP_AUTH_USER']; echo $wo_user; ?></strong></div></td>
   <td width="<?php echo "$page_width - 312"; ?>" align="center" valign="middle"><span class="header">Internal Work Order System</span><br>
     <span class="subHeader" style="margin-top:5px;">Version 1.0 BETA</span></td>
   <td width="55" align="left" valign="top"><img src="http://www.domainname.com/images/1x1_transparent.gif" width="1" height="1"></td>
   <td width="100" align="right"><img src="http://www.domainname.com/images/woman_phone3.jpg" width="97" height="119"></td>
   <td width="1" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="1" height="119"></td>
</tr>
</table>
</div>

<div align="center">
<table border="0" cellspacing="0" cellpadding="0" width="<?php echo "$page_width"; ?>" align="center">
<tr>
   <td width="<?php echo "$page_width"; ?>" colspan="3" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="<?php echo "$page_width"; ?>" height="1"></td>
</tr>
<tr>
   <td width="1" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="1" height="25"></td>
   <td width="<?php echo "$page_width - 2"; ?>" align="center" valign="middle" style="padding-left:10px;padding-right:10px;" class="navLink"><a href="add.php" class="navLink">new work order</a> | <a href="search.php" class="navLink">search work orders</a> | <a href="view_all.php" class="navLink">view all</a></td>
   <td width="1" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="1" height="25"></td>
</tr>
<tr>
   <td width="<?php echo "$page_width"; ?>" colspan="3" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="<?php echo "$page_width"; ?>" height="1"></td>
</tr>
</table>
</div>

<div align="center">

<table border="0" cellspacing="0" cellpadding="0" width="<?php echo "$page_width"; ?>" align="center">

<tr>

   <td width="1" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="1"></td>

   <td width="<?php echo "$page_width - 2"; ?>" style="padding-left:10px;padding-right:10px;padding-top:60px;padding-bottom:60px;"><div style="font-family:Verdana, Arial, Helvetica, sans-serif;font-size:14px;color:#990000;font-weight:bold;" align="center">You are not authorized to view/modify this work order.</div><br><br><div style="font-family:Verdana, Arial, Helvetica, sans-serif;font-size:10px;color:#990000;font-weight:bold;" align="center">Please ask <?php echo $myrow["salesRep"]; ?> or an administrator to view/modify for you.</div></td>

   <td width="1" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="1"></td>
</tr>
</table>

</div>

<div align="center"><img src="http://www.domainname.com/images/1x1_gray.gif" width="<?php echo "$page_width"; ?>" height="1"></div>

		<?php
		}
		else
		{


?>


<div align="center">
<table border="0" cellspacing="0" cellpadding="0" width="<?php echo "$page_width"; ?>" align="center">
<tr>
   <td width="<?php echo "$page_width"; ?>" colspan="7" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="<?php echo "$page_width"; ?>" height="1"></td>
</tr>
<tr>
   <td width="1" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="1" height="119"></td>
   <td width="15" align="left" valign="top"><img src="http://www.domainname.com/images/1x1_transparent.gif" width="1" height="1"></td>
   <td width="140" valign="top"><img src="http://www.domainname.com/images/logo_140x38.gif" width="140" height="38" style="margin-top:15px;"><div class="loggedIn" style="margin-top:15px;">You are currently<br>logged in as: <strong><?php $wo_user=$_SERVER['PHP_AUTH_USER']; echo $wo_user; ?></strong></div></td>
   <td width="<?php echo "$page_width - 312"; ?>" align="center" valign="middle"><span class="header">Internal Work Order System</span><br>
     <span class="subHeader" style="margin-top:5px;">Version 1.0 BETA</span></td>
   <td width="55" align="left" valign="top"><img src="http://www.domainname.com/images/1x1_transparent.gif" width="1" height="1"></td>
   <td width="100" align="right"><img src="http://www.domainname.com/images/woman_phone3.jpg" width="97" height="119"></td>
   <td width="1" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="1" height="119"></td>
</tr>
</table>
</div>

<div align="center">
<table border="0" cellspacing="0" cellpadding="0" width="<?php echo "$page_width"; ?>" align="center">
<tr>
   <td width="<?php echo "$page_width"; ?>" colspan="3" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="<?php echo "$page_width"; ?>" height="1"></td>
</tr>
<tr>
   <td width="1" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="1" height="25"></td>
   <td width="<?php echo "$page_width - 2"; ?>" align="center" valign="middle" style="padding-left:10px;padding-right:10px;" class="navLink"><a href="add.php" class="navLink">new work order</a> | <a href="search.php" class="navLink">search work orders</a> | <a href="view_all.php" class="navLink">view all</a></td>
   <td width="1" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="1" height="25"></td>
</tr>
<tr>
   <td width="<?php echo "$page_width"; ?>" colspan="3" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="<?php echo "$page_width"; ?>" height="1"></td>
</tr>
</table>
</div>

<div align="center">
<table border="0" cellspacing="0" cellpadding="0" width="<?php echo "$page_width"; ?>" align="center">
<tr>
   <td width="1" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="1"></td>
   <td width="758" style="padding-left:10px;padding-right:10px;padding-top:10px;">

<table border="0" width="<?php echo "$inside_width"; ?>">
  <tr>
    <td align="left" valign="top" class="style9">Add New Work Order:</td>
    <td align="right" class="style11">&nbsp;</td>
  </tr>
</table>

<br>

<div align="center">

<table border="0" align="center" width="<?php echo "$inside_width"; ?>">

  <tr>
    <td align="left" valign="top"><p><span class="style9">Customer WO#:</span> <span class="style10"><?php echo $myrow["id"] ?></span></p>
      <form method="POST" action="<?php echo $PHP_SELF?>">
	  <input type="hidden" name="id" value="<?php echo $myrow["id"] ?>">
	  
<table border="0" align="center" width="<?php echo "$inside_width"; ?>">
  <tr>
    <td align="left" valign="top"><span class="style9">Date Work Order Received:</span>&nbsp;&nbsp;<span class="style10"><input name="dateSubmitted" id="dateSubmitted" type="text" class="style10" size="40" value="<?php echo $myrow["dateSubmitted"] ?>"></span></td>
    <td align="right" class="style11">Current Status:&nbsp;&nbsp;<select size="1" name="status" value="<?php echo $myrow["status"] ?>"><option selected><?php 

	if ($myrow["invoiceNum"] > "")
	{
		$myrow["status"] = "Closed";
		echo $myrow["status"];
		//echo "Closed";
	}
	else
	{
		echo $myrow["status"];
	}

	?></option>

  <option>--</option>
  <option>Open</option>
  <option>In-Process</option>
  <option>Closed</option>
  </select></td>
  </tr>
</table><br>


	  <table border="0" align="center">
        <tr>
          <td width="100"><span class="style9">Customer:</span></td>
          <td><input name="customer" type="text" class="style10" id="customer" size="40" value="<?php echo $myrow["customer"] ?>"></td>
          <td width="10"><img src="http://www.domainname.com/images/1x1_transparent.gif" width="1" height="1"></td>
          <td width="90" class="style9">Ship Date: </td>
          <td><select name="shipDateMonth" class="style10" id="shipDateMonth" value="<?php echo $myrow["shipDateMonth"] ?>">
		  <option selected><?php echo $myrow["shipDateMonth"] ?></option>
		  <option>-- month --</option>
            <option>January</option>
            <option>February</option>
            <option>March</option>
            <option>April</option>
            <option>May</option>
            <option>June</option>
            <option>July</option>
            <option>August</option>
            <option>September</option>
            <option>October</option>
            <option>November</option>
            <option>December</option>
          </select>

            <select name="shipDateDay" class="style10" id="shipDateDay" value="<?php echo $myrow["shipDateDay"] ?>">
			  <option selected><?php echo $myrow["shipDateDay"] ?></option>
			  <option>-- day --</option>
              <option>01</option>
              <option>02</option>
              <option>03</option>
              <option>04</option>
              <option>05</option>
              <option>06</option>
              <option>07</option>
              <option>08</option>
              <option>09</option>
              <option>10</option>
              <option>11</option>
              <option>12</option>
              <option>13</option>
              <option>14</option>
              <option>15</option>
              <option>16</option>
              <option>17</option>
              <option>18</option>
              <option>19</option>
              <option>20</option>
              <option>21</option>
              <option>22</option>
              <option>23</option>
              <option>24</option>
              <option>25</option>
              <option>26</option>
              <option>27</option>
              <option>28</option>
              <option>29</option>
              <option>30</option>
              <option>31</option>
                </select>
            <select name="shipDateYear" class="style10" id="shipDateYear" value="<?php echo $myrow["shipDateYear"] ?>">
			<option selected><?php echo $myrow["shipDateYear"] ?></option>
			<option>-- year --</option>
			<option><?php echo date('Y')-1 ?></option>
              <option><?php echo date('Y') ?></option>
			<option><?php echo date('Y')+1 ?></option>
                </select></td>
        </tr>
        <tr>
          <td width="100"><span class="style9">Customer Type: </span></td>
          <td><select name="customerType" class="style10" id="customerType"><option selected><?php echo $myrow["customerType"] ?></option><option>----</option><option>End-User</option><option>Dealer</option></select></td>
          <td width="10"><img src="http://www.domainname.com/images/1x1_transparent.gif" width="1" height="1"></td>
          <td width="90" class="style9">Credit Card: </td>
          <td><select name="creditCard" class="style10" id="creditCard" value="<?php echo $myrow["creditCard"] ?>">
		  <option selected><?php echo $myrow["creditCard"] ?></option>
		  <option>----</option>
            <option>Yes</option>
            <option>No</option>
          </select></td>
        </tr>
        <tr>
          <td width="100"><span class="style9">Sales Rep: </span></td>
          <td><select name="salesRep" class="style10" id="salesRep" value="<?php echo $myrow["salesRep"] ?>">
            <option selected><?php echo $myrow["salesRep"] ?></option>
			<option>------</option>
			<option>Bill</option>
            <option>Tom</option>
            <option>Damian</option>
            <option>Charles</option>
            <option>Keith</option>
            <option>Dottie</option>
			<option>Curtis</option></select></td>
          <td width="10"><img src="http://www.domainname.com/images/1x1_transparent.gif" width="1" height="1"></td>
          <td width="90" class="style9">Customer PO#</td>
          <td><input name="customerPONum" type="text" class="style10" id="customerPONum" size="30" value="<?php echo $myrow["customerPONum"] ?>"></td>
        </tr>
      </table>
<br>
        <table border="0" align="center" width="<?php echo "$inside_width"; ?>">
          <tr class="style9">
            <td>Part Number </td>
            <td>Qty</td>
            <td>Description</td>
            <td>Condition</td>
            <td>Location/PO#</td>
            <td>Received</td>
          </tr>
          <tr>
            <td><select name="partNo1" id="partNo1" size="1" onChange="showSelected1()" class="style10">
<option selected value="<?php echo $myrow["partNo1"] ?>" class="style10"><?php echo $myrow["partNo1"] ?></option>
<option>--------------------</option>
<?php $query = "SELECT * from sunparts ORDER BY partnum ASC";
$result = mysql_query($query);
$description = array();
while ($item = mysql_fetch_array($result))
{
    $partnum=$item["partnum"];
    $description[$item['partnum']] =$item["description"];
    echo "<option value='$partnum' class='style10'>$partnum</option>";
}
echo "</select>"; ?></td>
            <td><input name="qty1" type="text" class="style10" id="qty1" size="10" value="<?php if ($myrow["qty1"] == "0") { echo ""; } else { echo $myrow["qty1"]; } ?>"></td>
            <td><input name="desc1" type="text" class="style10" id="desc1" size="40" value="<?php echo $myrow["desc1"] ?>"></td>
            <td><select name="condition1" class="style10" id="condition1" value="<?php echo $myrow["condition1"] ?>"><option selected><?php echo $myrow["condition1"] ?></option><option>----</option><option>New</option><option>Used</option></select></td>
            <td><input name="location1" type="text" class="style10" id="location1" size="20" value="<?php echo $myrow["location1"] ?>"></td>
            <td><input name="received1" type="text" class="style10" id="received1" size="10" value="<?php echo $myrow["received1"] ?>"></td>
          </tr>

          <tr>
            <td><select name="partNo2" id="partNo2" size="1" onChange="showSelected2()" class="style10">
<option selected value="<?php echo $myrow["partNo2"] ?>" class="style10"><?php echo $myrow["partNo2"] ?></option>
<option>--------------------</option>
<?php $query = "SELECT * from sunparts ORDER BY partnum ASC";
$result = mysql_query($query);
$description = array();
while ($item = mysql_fetch_array($result))
{
    $partnum=$item["partnum"];
    $description[$item['partnum']] =$item["description"];
    echo "<option value='$partnum' class='style10'>$partnum</option>";
}
echo "</select>"; ?></td>
            <td><input name="qty2" type="text" class="style10" id="qty2" size="10" value="<?php if ($myrow["qty2"] == "0") { echo ""; } else { echo $myrow["qty2"]; } ?>"></td>
            <td><input name="desc2" type="text" class="style10" id="desc2" size="40" value="<?php echo $myrow["desc2"] ?>"></td>
            <td><select name="condition2" class="style10" id="condition2" value="<?php echo $myrow["condition2"] ?>"><option selected><?php echo $myrow["condition2"] ?></option><option>----</option><option>New</option><option>Used</option></select></td>
            <td><input name="location2" type="text" class="style10" id="location2" size="20" value="<?php echo $myrow["location2"] ?>"></td>
            <td><input name="received2" type="text" class="style10" id="received2" size="10" value="<?php echo $myrow["received2"] ?>"></td>
          </tr>

          <tr>
            <td><select name="partNo3" id="partNo3" size="1" onChange="showSelected3()" class="style10">
<option selected value="<?php echo $myrow["partNo3"] ?>" class="style10"><?php echo $myrow["partNo3"] ?></option>
<option>--------------------</option>
<?php $query = "SELECT * from sunparts ORDER BY partnum ASC";
$result = mysql_query($query);
$description = array();
while ($item = mysql_fetch_array($result))
{
    $partnum=$item["partnum"];
    $description[$item['partnum']] =$item["description"];
    echo "<option value='$partnum' class='style10'>$partnum</option>";
}
echo "</select>"; ?></td>
            <td><input name="qty3" type="text" class="style10" id="qty3" size="10" value="<?php if ($myrow["qty3"] == "0") { echo ""; } else { echo $myrow["qty3"]; } ?>"></td>
            <td><input name="desc3" type="text" class="style10" id="desc3" size="40" value="<?php echo $myrow["desc3"] ?>"></td>
            <td><select name="condition3" class="style10" id="condition3" value="<?php echo $myrow["condition3"] ?>"><option selected><?php echo $myrow["condition3"] ?></option><option>----</option><option>New</option><option>Used</option></select></td>
            <td><input name="location3" type="text" class="style10" id="location3" size="20" value="<?php echo $myrow["location3"] ?>"></td>
            <td><input name="received3" type="text" class="style10" id="received3" size="10" value="<?php echo $myrow["received3"] ?>"></td>
          </tr>

          <tr>
            <td><select name="partNo4" id="partNo4" size="1" onChange="showSelected4()" class="style10">
<option selected value="<?php echo $myrow["partNo4"] ?>" class="style10"><?php echo $myrow["partNo4"] ?></option>
<option>--------------------</option>
<?php $query = "SELECT * from sunparts ORDER BY partnum ASC";
$result = mysql_query($query);
$description = array();
while ($item = mysql_fetch_array($result))
{
    $partnum=$item["partnum"];
    $description[$item['partnum']] =$item["description"];
    echo "<option value='$partnum' class='style10'>$partnum</option>";
}
echo "</select>"; ?></td>
            <td><input name="qty4" type="text" class="style10" id="qty4" size="10" value="<?php if ($myrow["qty4"] == "0") { echo ""; } else { echo $myrow["qty4"]; } ?>"></td>
            <td><input name="desc4" type="text" class="style10" id="desc4" size="40" value="<?php echo $myrow["desc4"] ?>"></td>
            <td><select name="condition4" class="style10" id="condition4" value="<?php echo $myrow["condition4"] ?>"><option selected><?php echo $myrow["condition4"] ?></option><option>----</option><option>New</option><option>Used</option></select></td>
            <td><input name="location4" type="text" class="style10" id="location4" size="20" value="<?php echo $myrow["location4"] ?>"></td>
            <td><input name="received4" type="text" class="style10" id="received4" size="10" value="<?php echo $myrow["received4"] ?>"></td>
          </tr>

          <tr>
            <td><select name="partNo5" id="partNo1" size="1" onChange="showSelected5()" class="style10">
<option selected value="<?php echo $myrow["partNo5"] ?>" class="style10"><?php echo $myrow["partNo5"] ?></option>
<option>--------------------</option>
<?php $query = "SELECT * from sunparts ORDER BY partnum ASC";
$result = mysql_query($query);
$description = array();
while ($item = mysql_fetch_array($result))
{
    $partnum=$item["partnum"];
    $description[$item['partnum']] =$item["description"];
    echo "<option value='$partnum' class='style10'>$partnum</option>";
}
echo "</select>"; ?></td>
            <td><input name="qty5" type="text" class="style10" id="qty5" size="10" value="<?php if ($myrow["qty5"] == "0") { echo ""; } else { echo $myrow["qty5"]; } ?>"></td>
            <td><input name="desc5" type="text" class="style10" id="desc5" size="40" value="<?php echo $myrow["desc5"] ?>"></td>
            <td><select name="condition5" class="style10" id="condition5" value="<?php echo $myrow["condition5"] ?>"><option selected><?php echo $myrow["condition5"] ?></option><option>----</option><option>New</option><option>Used</option></select></td>
            <td><input name="location5" type="text" class="style10" id="location5" size="20" value="<?php echo $myrow["location5"] ?>"></td>
            <td><input name="received5" type="text" class="style10" id="received5" size="10" value="<?php echo $myrow["received5"] ?>"></td>
          </tr>

          <tr>
            <td><select name="partNo6" id="partNo6" size="1" onChange="showSelected6()" class="style10">
<option selected value="<?php echo $myrow["partNo6"] ?>" class="style10"><?php echo $myrow["partNo6"] ?></option>
<option>--------------------</option>
<?php $query = "SELECT * from sunparts ORDER BY partnum ASC";
$result = mysql_query($query);
$description = array();
while ($item = mysql_fetch_array($result))
{
    $partnum=$item["partnum"];
    $description[$item['partnum']] =$item["description"];
    echo "<option value='$partnum' class='style10'>$partnum</option>";
}
echo "</select>"; ?></td>
            <td><input name="qty6" type="text" class="style10" id="qty6" size="10" value="<?php if ($myrow["qty6"] == "0") { echo ""; } else { echo $myrow["qty6"]; } ?>"></td>
            <td><input name="desc6" type="text" class="style10" id="desc6" size="40" value="<?php echo $myrow["desc6"] ?>"></td>
            <td><select name="condition6" class="style10" id="condition6" value="<?php echo $myrow["condition6"] ?>"><option selected><?php echo $myrow["condition6"] ?></option><option>----</option><option>New</option><option>Used</option></select></td>
            <td><input name="location6" type="text" class="style10" id="location6" size="20" value="<?php echo $myrow["location6"] ?>"></td>
            <td><input name="received6" type="text" class="style10" id="received6" size="10" value="<?php echo $myrow["received6"] ?>"></td>
          </tr>

          <tr>
            <td><select name="partNo7" id="partNo7" size="1" onChange="showSelected7()" class="style10">
<option selected value="<?php echo $myrow["partNo7"] ?>" class="style10"><?php echo $myrow["partNo7"] ?></option>
<option>--------------------</option>
<?php $query = "SELECT * from sunparts ORDER BY partnum ASC";
$result = mysql_query($query);
$description = array();
while ($item = mysql_fetch_array($result))
{
    $partnum=$item["partnum"];
    $description[$item['partnum']] =$item["description"];
    echo "<option value='$partnum' class='style10'>$partnum</option>";
}
echo "</select>"; ?></td>
            <td><input name="qty7" type="text" class="style10" id="qty7" size="10" value="<?php if ($myrow["qty7"] == "0") { echo ""; } else { echo $myrow["qty7"]; } ?>"></td>
            <td><input name="desc7" type="text" class="style10" id="desc7" size="40" value="<?php echo $myrow["desc7"] ?>"></td>
            <td><select name="condition7" class="style10" id="condition7" value="<?php echo $myrow["condition7"] ?>"><option selected><?php echo $myrow["condition7"] ?></option><option>----</option><option>New</option><option>Used</option></select></td>
            <td><input name="location7" type="text" class="style10" id="location7" size="20" value="<?php echo $myrow["location7"] ?>"></td>
            <td><input name="received7" type="text" class="style10" id="received7" size="10" value="<?php echo $myrow["received7"] ?>"></td>
          </tr>

          <tr>
            <td><select name="partNo8" id="partNo8" size="1" onChange="showSelected8()" class="style10">
<option selected value="<?php echo $myrow["partNo8"] ?>" class="style10"><?php echo $myrow["partNo8"] ?></option>
<option>--------------------</option>
<?php $query = "SELECT * from sunparts ORDER BY partnum ASC";
$result = mysql_query($query);
$description = array();
while ($item = mysql_fetch_array($result))
{
    $partnum=$item["partnum"];
    $description[$item['partnum']] =$item["description"];
    echo "<option value='$partnum' class='style10'>$partnum</option>";
}
echo "</select>"; ?></td>
            <td><input name="qty8" type="text" class="style10" id="qty8" size="10" value="<?php if ($myrow["qty8"] == "0") { echo ""; } else { echo $myrow["qty8"]; } ?>"></td>
            <td><input name="desc8" type="text" class="style10" id="desc8" size="40" value="<?php echo $myrow["desc8"] ?>"></td>
            <td><select name="condition8" class="style10" id="condition8" value="<?php echo $myrow["condition8"] ?>"><option selected><?php echo $myrow["condition8"] ?></option><option>----</option><option>New</option><option>Used</option></select></td>
            <td><input name="location8" type="text" class="style10" id="location8" size="20" value="<?php echo $myrow["location8"] ?>"></td>
            <td><input name="received8" type="text" class="style10" id="received8" size="10" value="<?php echo $myrow["received8"] ?>"></td>
          </tr>

          <tr>
            <td><select name="partNo9" id="partNo9" size="1" onChange="showSelected9()" class="style10">
<option selected value="<?php echo $myrow["partNo9"] ?>" class="style10"><?php echo $myrow["partNo9"] ?></option>
<option>--------------------</option>
<?php $query = "SELECT * from sunparts ORDER BY partnum ASC";
$result = mysql_query($query);
$description = array();
while ($item = mysql_fetch_array($result))
{
    $partnum=$item["partnum"];
    $description[$item['partnum']] =$item["description"];
    echo "<option value='$partnum' class='style10'>$partnum</option>";
}
echo "</select>"; ?></td>
            <td><input name="qty9" type="text" class="style10" id="qty9" size="10" value="<?php if ($myrow["qty9"] == "0") { echo ""; } else { echo $myrow["qty9"]; } ?>"></td>
            <td><input name="desc9" type="text" class="style10" id="desc9" size="40" value="<?php echo $myrow["desc9"] ?>"></td>
            <td><select name="condition9" class="style10" id="condition9" value="<?php echo $myrow["condition9"] ?>"><option selected><?php echo $myrow["condition9"] ?></option><option>----</option><option>New</option><option>Used</option></select></td>
            <td><input name="location9" type="text" class="style10" id="location9" size="20" value="<?php echo $myrow["location9"] ?>"></td>
            <td><input name="received9" type="text" class="style10" id="received9" size="10" value="<?php echo $myrow["received9"] ?>"></td>
          </tr>

          <tr>
            <td><select name="partNo10" id="partNo10" size="1" onChange="showSelected10()" class="style10">
<option selected value="<?php echo $myrow["partNo10"] ?>" class="style10"><?php echo $myrow["partNo10"] ?></option>
<option>--------------------</option>
<?php $query = "SELECT * from sunparts ORDER BY partnum ASC";
$result = mysql_query($query);
$description = array();
while ($item = mysql_fetch_array($result))
{
    $partnum=$item["partnum"];
    $description[$item['partnum']] =$item["description"];
    echo "<option value='$partnum' class='style10'>$partnum</option>";
}
echo "</select>"; ?></td>
            <td><input name="qty10" type="text" class="style10" id="qty10" size="10" value="<?php if ($myrow["qty10"] == "0") { echo ""; } else { echo $myrow["qty10"]; } ?>"></td>
            <td><input name="desc10" type="text" class="style10" id="desc10" size="40" value="<?php echo $myrow["desc10"] ?>"></td>
            <td><select name="condition10" class="style10" id="condition10" value="<?php echo $myrow["condition10"] ?>"><option selected><?php echo $myrow["condition10"] ?></option><option>----</option><option>New</option><option>Used</option></select></td>
            <td><input name="location10" type="text" class="style10" id="location10" size="20" value="<?php echo $myrow["location10"] ?>"></td>
            <td><input name="received10" type="text" class="style10" id="received10" size="10" value="<?php echo $myrow["received10"] ?>"></td>
          </tr>





          <tr>
            <td><select name="partNo10" id="partNo11" size="1" onChange="showSelected11()" class="style10">
<option selected value="<?php echo $myrow["partNo11"] ?>" class="style10"><?php echo $myrow["partNo11"] ?></option>
<option>--------------------</option>
<?php $query = "SELECT * from sunparts ORDER BY partnum ASC";
$result = mysql_query($query);
$description = array();
while ($item = mysql_fetch_array($result))
{
    $partnum=$item["partnum"];
    $description[$item['partnum']] =$item["description"];
    echo "<option value='$partnum' class='style10'>$partnum</option>";
}
echo "</select>"; ?></td>
            <td><input name="qty11" type="text" class="style10" id="qty11" size="10" value="<?php if ($myrow["qty11"] == "0") { echo ""; } else { echo $myrow["qty11"]; } ?>"></td>
            <td><input name="desc11" type="text" class="style10" id="desc11" size="40" value="<?php echo $myrow["desc11"] ?>"></td>
            <td><select name="condition11" class="style10" id="condition11" value="<?php echo $myrow["condition11"] ?>"><option selected><?php echo $myrow["condition11"] ?></option><option>----</option><option>New</option><option>Used</option></select></td>
            <td><input name="location11" type="text" class="style10" id="location11" size="20" value="<?php echo $myrow["location11"] ?>"></td>
            <td><input name="received11" type="text" class="style10" id="received11" size="10" value="<?php echo $myrow["received11"] ?>"></td>
          </tr>





          <tr>
            <td><select name="partNo12" id="partNo12" size="1" onChange="showSelected12()" class="style10">
<option selected value="<?php echo $myrow["partNo12"] ?>" class="style10"><?php echo $myrow["partNo12"] ?></option>
<option>--------------------</option>
<?php $query = "SELECT * from sunparts ORDER BY partnum ASC";
$result = mysql_query($query);
$description = array();
while ($item = mysql_fetch_array($result))
{
    $partnum=$item["partnum"];
    $description[$item['partnum']] =$item["description"];
    echo "<option value='$partnum' class='style10'>$partnum</option>";
}
echo "</select>"; ?></td>
            <td><input name="qty12" type="text" class="style10" id="qty12" size="10" value="<?php if ($myrow["qty12"] == "0") { echo ""; } else { echo $myrow["qty12"]; } ?>"></td>
            <td><input name="desc12" type="text" class="style10" id="desc12" size="40" value="<?php echo $myrow["desc12"] ?>"></td>
            <td><select name="condition12" class="style10" id="condition12" value="<?php echo $myrow["condition12"] ?>"><option selected><?php echo $myrow["condition12"] ?></option><option>----</option><option>New</option><option>Used</option></select></td>
            <td><input name="location12" type="text" class="style10" id="location12" size="20" value="<?php echo $myrow["location12"] ?>"></td>
            <td><input name="received12" type="text" class="style10" id="received12" size="10" value="<?php echo $myrow["received12"] ?>"></td>
          </tr>




          <tr>
            <td><select name="partNo13" id="partNo13" size="1" onChange="showSelected13()" class="style10">
<option selected value="<?php echo $myrow["partNo13"] ?>" class="style10"><?php echo $myrow["partNo13"] ?></option>
<option>--------------------</option>
<?php $query = "SELECT * from sunparts ORDER BY partnum ASC";
$result = mysql_query($query);
$description = array();
while ($item = mysql_fetch_array($result))
{
    $partnum=$item["partnum"];
    $description[$item['partnum']] =$item["description"];
    echo "<option value='$partnum' class='style10'>$partnum</option>";
}
echo "</select>"; ?></td>
            <td><input name="qty13" type="text" class="style10" id="qty13" size="10" value="<?php if ($myrow["qty13"] == "0") { echo ""; } else { echo $myrow["qty13"]; } ?>"></td>
            <td><input name="desc13" type="text" class="style10" id="desc13" size="40" value="<?php echo $myrow["desc13"] ?>"></td>
            <td><select name="condition13" class="style10" id="condition13" value="<?php echo $myrow["condition13"] ?>"><option selected><?php echo $myrow["condition13"] ?></option><option>----</option><option>New</option><option>Used</option></select></td>
            <td><input name="location13" type="text" class="style10" id="location13" size="20" value="<?php echo $myrow["location13"] ?>"></td>
            <td><input name="received13" type="text" class="style10" id="received13" size="10" value="<?php echo $myrow["received13"] ?>"></td>
          </tr>


          <tr>
            <td><select name="partNo14" id="partNo14" size="1" onChange="showSelected14()" class="style10">
<option selected value="<?php echo $myrow["partNo14"] ?>" class="style10"><?php echo $myrow["partNo14"] ?></option>
<option>--------------------</option>
<?php $query = "SELECT * from sunparts ORDER BY partnum ASC";
$result = mysql_query($query);
$description = array();
while ($item = mysql_fetch_array($result))
{
    $partnum=$item["partnum"];
    $description[$item['partnum']] =$item["description"];
    echo "<option value='$partnum' class='style10'>$partnum</option>";
}
echo "</select>"; ?></td>
            <td><input name="qty14" type="text" class="style10" id="qty14" size="10" value="<?php if ($myrow["qty14"] == "0") { echo ""; } else { echo $myrow["qty14"]; } ?>"></td>
            <td><input name="desc14" type="text" class="style10" id="desc14" size="40" value="<?php echo $myrow["desc14"] ?>"></td>
            <td><select name="condition14" class="style10" id="condition14" value="<?php echo $myrow["condition14"] ?>"><option selected><?php echo $myrow["condition14"] ?></option><option>----</option><option>New</option><option>Used</option></select></td>
            <td><input name="location14" type="text" class="style10" id="location14" size="20" value="<?php echo $myrow["location14"] ?>"></td>
            <td><input name="received14" type="text" class="style10" id="received14" size="10" value="<?php echo $myrow["received14"] ?>"></td>
          </tr>


          <tr>
            <td><select name="partNo15" id="partNo15" size="1" onChange="showSelected15()" class="style10">
<option selected value="<?php echo $myrow["partNo15"] ?>" class="style10"><?php echo $myrow["partNo15"] ?></option>
<option>--------------------</option>
<?php $query = "SELECT * from sunparts ORDER BY partnum ASC";
$result = mysql_query($query);
$description = array();
while ($item = mysql_fetch_array($result))
{
    $partnum=$item["partnum"];
    $description[$item['partnum']] =$item["description"];
    echo "<option value='$partnum' class='style10'>$partnum</option>";
}
echo "</select>"; ?></td>
            <td><input name="qty15" type="text" class="style10" id="qty15" size="10" value="<?php if ($myrow["qty15"] == "0") { echo ""; } else { echo $myrow["qty15"]; } ?>"></td>
            <td><input name="desc15" type="text" class="style10" id="desc15" size="40" value="<?php echo $myrow["desc15"] ?>"></td>
            <td><select name="condition15" class="style10" id="condition15" value="<?php echo $myrow["condition15"] ?>"><option selected><?php echo $myrow["condition15"] ?></option><option>----</option><option>New</option><option>Used</option></select></td>
            <td><input name="location15" type="text" class="style10" id="location15" size="20" value="<?php echo $myrow["location15"] ?>"></td>
            <td><input name="received15" type="text" class="style10" id="received15" size="10" value="<?php echo $myrow["received15"] ?>"></td>
          </tr>




          <tr>
            <td colspan="6" align="right" class="style9"><br>Tested by (initial):&nbsp;<input name="testedBy" type="text" class="style10" id="testedBy" size="10" value="<?php echo $myrow["testedBy"] ?>"></td>
          </tr>

        </table>


<br>

<?php
echo "<script type=\"text/javascript\">
var Descriptions = new Array();\n";
foreach ($description as $key => $value)
{
	$myModString = str_replace("'", "\'", $value);
	echo "Descriptions['$key'] = '$myModString'\n";
}
echo '</script>';
?>
        <table border="0" align="center">
          <tr>
            <td><p><span class="style9">Notes:</span><br><textarea name="notes" id="notes" cols="80" rows="5" class="style10" value="<?php echo $myrow["notes"] ?>"><?php echo $myrow["notes"] ?></textarea></p>
              <p><span class="style9">Final System Config:</span><br><textarea name="finalSystemConfig" id="finalSystemConfig" cols="80" rows="5" class="style10" value="<?php echo $myrow["finalSystemConfig"] ?>"><?php echo $myrow["finalSystemConfig"] ?></textarea></p>
              <p><span class="style9">Shipping Info:</span><br><textarea name="shippingInfo" id="shippingInfo" cols="80" rows="5" class="style10" value="<?php echo $myrow["shippingInfo"] ?>"><?php echo $myrow["shippingInfo"] ?></textarea></p>
			  <p><span class="style9">Sign-Off Person:</span><br><input name="signOffPerson" id="signOffPerson" type="text" class="style10" value="<?php echo $myrow["signOffPerson"] ?>" size="80"></p>
			  <p><span class="style9">Shipped? (initial if yes)</span><br><input name="shippingConfirmation" id="shippingConfirmation" type="text" class="style10" value="<?php echo $myrow["shippingConfirmation"] ?>" size="20"></p>
			  <p><span class="style9">Invoice #</span><br><input name="invoiceNum" id="invoiceNum" type="text" class="style10" value="<?php echo $myrow["invoiceNum"] ?>" size="20"></p></td>
            </tr>
        </table>
        <p>
          <div align="center" class="style9"><input type="submit" name="update" value="Update"></div>
        </form>
		<div align="right" class="style10"><a href="javascript:popUp('add_partnumber.php')" class="style10">Add Part Number</a>&nbsp;|&nbsp;<a href="view.php?id=<? print $myrow["id"]; ?>" class="style10">View</a></div></td>
  </tr>
</table>
</div>
   </td>
   <td width="1" bgcolor="7e8083"><img src="http://www.domainname.com/images/1x1_gray.gif" width="1"></td>
</tr>
</table>
</div>

<div align="center"><img src="http://www.domainname.com/images/1x1_gray.gif" width="<?php echo "$page_width"; ?>" height="1"></div>

<?
	}
}
?>

</body>
</html>
dyonak
Forum Commoner
Posts: 56
Joined: Wed Jun 22, 2005 10:22 am
Location: Minneapolis, MN
Contact:

Post by dyonak »

You're missing your $ in front of those 3 variables, the 3 at the end

Code: Select all

$query = "UPDATE $DB_TABLE1 SET status='$status',customer='$customer',customerType='$customerType',salesRep='$salesRep',shipDateMonth='$shipDateMonth',
shipDateDay='$shipDateDay',shipDateYear='$shipDateYear',creditCard='$creditCard',
partNo1='$partNo1',qty1='$qty1',desc1='$desc1',condition1='$condition1',location1='$location1',received1='$received1',
partNo2='$partNo2',qty2='$qty2',desc2='$desc2',condition2='$condition2',location2='$location2',received2='$received2',
partNo3='$partNo3',qty3='$qty3',desc3='$desc3',condition3='$condition3',location3='$location3',received3='$received3',
partNo4='$partNo4',qty4='$qty4',desc4='$desc4',condition4='$condition4',location4='$location4',received4='$received4',
partNo5='$partNo5',qty5='$qty5',desc5='$desc5',condition5='$condition5',location5='$location5',received5='$received5',
partNo6='$partNo6',qty6='$qty6',desc6='$desc6',condition6='$condition6',location6='$location6',received6='$received6',
partNo7='$partNo7',qty7='$qty7',desc7='$desc7',condition7='$condition7',location7='$location7',received7='$received7',
partNo8='$partNo8',qty8='$qty8',desc8='$desc8',condition8='$condition8',location8='$location8',received8='$received8',
partNo9='$partNo9',qty9='$qty9',desc9='$desc9',condition9='$condition9',location9='$location9',received9='$received9',
partNo10='$partNo10',qty10='$qty10',desc10='$desc10',condition10='$condition10',location10='$location10',received10='$received10',
partNo11='$partNo11',qty11='$qty11',desc11='$desc11',condition11='$condition11',location11='$location11',received11='$received11',
partNo12='$partNo12',qty12='$qty12',desc12='$desc12',condition12='$condition12',location12='$location12',received12='$received12',
partNo13='$partNo13',qty13='$qty13',desc13='$desc13',condition13='$condition13',location13='$location13',received13='$received13',
partNo14='$partNo14',qty14='$qty14',desc14='$desc14',condition14='$condition14',location14='$location14',received14='$received14',
partNo15='$partNo15',qty15='$qty15',desc15='$desc15',condition15='$condition15',location15='$location15',received15='$received15',
testedBy='$testedBy',notes='$notes',finalSystemConfig='$finalSystemConfig',shippingInfo='$shippingInfo',signOffPerson='$signOffPerson',
shippingConfirmation='$shippingConfirmation',[b]invoiceNum='invoiceNum',dateSubmitted='dateSubmitted',customerPONum='customerPONum'[/b] WHERE id='$id'";
Curtis782
Forum Commoner
Posts: 31
Joined: Tue Oct 25, 2005 3:34 pm

Post by Curtis782 »

Thank you!!
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

change...

Code: Select all

<option>01</option> 
              <option>02</option> 
              <option>03</option> 
              <option>04</option> 
              <option>05</option> 
              <option>06</option> 
              <option>07</option> 
              <option>08</option> 
              <option>09</option> 
              <option>10</option> 
              <option>11</option> 
              <option>12</option> 
              <option>13</option> 
              <option>14</option> 
              <option>15</option> 
              <option>16</option> 
              <option>17</option> 
              <option>18</option> 
              <option>19</option> 
              <option>20</option> 
              <option>21</option> 
              <option>22</option> 
              <option>23</option> 
              <option>24</option> 
              <option>25</option> 
              <option>26</option> 
              <option>27</option> 
              <option>28</option> 
              <option>29</option> 
              <option>30</option> 
              <option>31</option>
to

Code: Select all

for ($i=1;$i<32;$i++)
{
echo ("<option>");
 if ($i<10)
 {
   echo ("0".$i."");
 }
else { echo $i; }
echo ("</option>");
}
so much more compact... :-D you could make that more compact but...ehh.it'll be okay:-D
Curtis782
Forum Commoner
Posts: 31
Joined: Tue Oct 25, 2005 3:34 pm

Post by Curtis782 »

Thank you, Charles. This should help the script run faster too.
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

most compact :P

Code: Select all

foreach (range(1, 31) as $day)
 echo '<option>'.str_pad($day, 2, '0', STR_PAD_LEFT).'</option>';
Post Reply