Jump to content


Photo

Help figuring this out


  • Please log in to reply
17 replies to this topic

#1 kenwvs

kenwvs
  • Members
  • PipPipPip
  • Advanced Member
  • 194 posts

Posted 18 August 2006 - 07:39 AM

I have a script that for some reason (can't figure it out) it won't update to the database.  When I run the script, it doesn't produce any errors, it goes through like it should, but it just doesn't update.

I have created a form that works properly to create a work order.  Now when a manager looks at it, and adds a purchase order number and comments, it won't add them to the database.

A  couple of things I am not sure it they are related is on the line below, it doesn't show in my editor as being a php code, yet, when I run it, the data is inserted into the form field.  When I just pasted it to this posting, I see it shows up that they are working, so must be in my editor.....not liking something.
There are a number of lines that act like this.  All the lines that use $workorderInfo[] are doing this.
Unit Starts:<input type="text" value="<?php echo $workorderInfo['Starts']; ?>" size="10" id="Starts">

The other thing I am not sure about is if the isset() is set up properly, to work through the form and ultimately submit it to the database.

Here is the complete code.  If you need me to try something, please ask, and I will do my best to get it for you.  I have been looking at this for days and can't figure out what the problem is that it won't update to the DB, I know the DB is set up properly.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>GE Jenbacher</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="ge.css" rel="stylesheet" type="text/css">
<?php
include_once "myconnect.php";
$Contact = $_POST['Contact'];
// GEWOManager.php
?>
</head>
<body>
<div class="clearfix" id="mainbox"><!--Open Mainbox-->
<div id="header"<!--Open Header-->
<div id="headerleft"><h1>GE Jenbacher<BR><BR><span class="indent"> Work Order</span><BR></h1><!--Open Left Header-->
</div> <!--Close Left Header-->
<div id="headerright"><a href="#" title="GE Jenbacher">
<img src="leftimage.gif" alt="GE Jenbacher Right Image"
width="205" height="56" border="0" align="right"></a> <!--Open Right Header-->
</div>
</div> <!--Close Header-->
<div id="topnav"><!--Open Top Navigation-->
Manager Update <span class ="sub"><BR> (Assign a Purchase Order) </span>
</div><!--Close Top Navigation -->
<div id="content"><BR><BR><BR> <!--Open Content-->
<?php
$query=mysql_query("SELECT Work, Sched, Name, Site, Serial, Hours, Starts, Issue, Severity,
Resolution, Assistance, PartsA, PartsB, PartsC, PartsD, PartsE, PartsF, PartsG, Safety 
FROM workorder WHERE Work='$Contact'");
if (!$query) {
    echo "YOU HAVE AN ERROR IN YOUR QUERY!<br>\n";
    echo mysql_error();
} else {
    $workorderInfo = mysql_fetch_assoc($query);
}
//this is just for testing
if (mysql_num_rows($query) == 0) {
    echo "No rows returned from table workorder using ID = '$Work'<br>\n";
}
?>
<?php
if (!isset($_POST['Submit']))
{
?>
<form action="" method="post" enctype="multipart/form-data">
<center><div>Purchase Order #:<input type="text" size="12" maxlength="12" name="Purchase"><BR><BR>
<div><B>Manager Comments:<BR><textarea rows="4" name="Comment" cols="80"></textarea>
</div></B><BR><BR>
<div>Work Order Number:<input type="text" value="<?php echo $workorderInfo['Work']; ?>" size="10" id="Work">
Date:<input type="text" value="<?php echo $workorderInfo['Sched']; ?>" size="10" id="Sched">
Technician:<input type="text" value="<?php echo $workorderInfo['Name']; ?> " size="25" id="Name"> <BR><BR>
Site:<input type="text" value="<?php echo $workorderInfo['Site']; ?>" size="20" id="Site">
Unit Serial Number:<input type="text" value="<?php echo $workorderInfo['Serial']; ?>" size="10" id="Serial">
Unit Hours:<input type="text" value="<?php echo $workorderInfo['Hours']; ?>" size="10" id="Hours">
<BR></><BR></>
Unit Starts:<input type="text" value="<?php echo $workorderInfo['Starts']; ?>" size="10" id="Starts">
Severity:<input type="text" value="<?php echo $workorderInfo['Severity']; ?>" size="25" id="Severe">
 Safety:<input type="text" value="<?php echo $workorderInfo['Safety']; ?>" size="25" id="Safety">
</div> <BR>
<div><B>Description of Issue</B><BR>
<textarea id="Issue" rows="4" cols="80"><?php echo mysql_result($query, 0, 'Issue') ?></textarea></div><BR>
<div><B>Possible Resolution</B><BR>
<textarea id="Resolve" rows="4" cols="80"><?php echo mysql_result($query, 0, 'Resolution') ?></textarea></div><BR>
<div><B>List of Parts Required (one part per line)</B>:</div>
<div><input type="textbox" value="<?php echo $workorderInfo['PartsA']; ?>" size="80" maxlength="80" id="PartsA"><BR>
<input type="textbox" value="<?php echo $workorderInfo['PartsB']; ?>" size="80" maxlength="80" id="PartsB"><BR>
<input type="textbox" value="<?php echo $workorderInfo['PartsC']; ?>" size="80" maxlength="80" id="PartsC"><BR>
<input type="textbox" value="<?php echo $workorderInfo['PartsD']; ?>" size="80" maxlength="80" id="PartsD"><BR>
<input type="textbox" value="<?php echo $workorderInfo['PartsE']; ?>" size="80" maxlength="80" id="PartsE"><BR>
<input type="textbox" value="<?php echo $workorderInfo['PartsF']; ?>" size="80" maxlength="80" id="PartsF"><BR>
<input type="textbox" value="<?php echo $workorderInfo['PartsG']; ?>" size="80" maxlength="80" id="PartsG"><BR>
</div><BR>
<div><B>Request for Assistance:<BR>
<textarea id="Assist" rows="4" cols="80"><?php echo mysql_result($query, 0, 'Assistance') ?></textarea></div><BR>
<div><center><B>The Following people were advised of this Work Order:<BR>
<?php
$result = mysql_query("SELECT * FROM employees") or die(mysql_error());
echo "<select name='Tech'multiple>";
while($row=mysql_fetch_array($result))
{
  echo"<option>$row[Name]</option>";
}
  echo"</select>";
?></select><BR><BR><BR>
<div><input type="submit" name="Submit" value="Update Work Order"><BR><BR><BR><BR></center>
<input type="hidden" name="Contact" value="<?php echo $_POST['Contact']; ?>" />
</form>
</div>

</div><!--Close Content-->
<div id="footer"><!--Open Footer-->
Developed by Ken Van Someren - 2006<BR><!-- Open Footer -->
Permission must be granted for any and all use<BR>No Guarantees as to the reliability
or suitability of this document is provided.
 <!-- Close Footer -->
</div><!-- Close Mainbox -->
<?php
exit();
}
 else
{
$Purchase = $_POST["Purchase"];
$Comment = $_POST["Comment"];

mysql_query ("UPDATE `workorder` set Purchase = '$Purchase', Comment = '$Comment' WHERE work = '$Work'")
or die(mysql_error());
}
exit();
?>
<?php
//echo print_r($_POST)
?>
</body>
</html>



#2 GingerRobot

GingerRobot
  • Staff Alumni
  • Advanced Member
  • 4,086 posts
  • LocationUK

Posted 18 August 2006 - 07:54 AM

When you say it wont add them to the database, i can only assume that you mean this query:
mysql_query ("UPDATE `workorder` set Purchase = '$Purchase', Comment = '$Comment' WHERE work = '$Work'")
or die(mysql_error());

Because there is no INSERT query any where.

As far as i can see, your use of isset() is fine, but try this with the query:

$sql ="UPDATE `workorder` set Purchase = '$Purchase', Comment = '$Comment' WHERE work = '$Work'";
mysql_query($sql)or die(mysql_error());
echo $sql;

So you can see what the query is actually doing. There may be no errors in it, but perhaps one of the variables isn't right.

#3 kenwvs

kenwvs
  • Members
  • PipPipPip
  • Advanced Member
  • 194 posts

Posted 18 August 2006 - 07:56 AM

I will try this, just to be sure I am looking in the right place, where should the echo $sql; show up.... on the main page, as once I push submit, it returns to the same page, with the info still on the page.

Ken

#4 GingerRobot

GingerRobot
  • Staff Alumni
  • Advanced Member
  • 4,086 posts
  • LocationUK

Posted 18 August 2006 - 07:58 AM

Just change this line:
mysql_query ("UPDATE `workorder` set Purchase = '$Purchase', Comment = '$Comment' WHERE work = '$Work'")
or die(mysql_error());

For the code i posted.

#5 kenwvs

kenwvs
  • Members
  • PipPipPip
  • Advanced Member
  • 194 posts

Posted 18 August 2006 - 08:04 AM

When I put that in the code, the following line came on the script.  I never had the chance to add comments or anything.  The page with all the form fields never appeared.  You have one page where you key the work order in and it is suppose to return the results from the DB with that invoice number.  I never got to that point, just this line where the info would normally be displayed

UPDATE `workorder` set Purchase = '', Comment = '' WHERE work = ''



#6 GingerRobot

GingerRobot
  • Staff Alumni
  • Advanced Member
  • 4,086 posts
  • LocationUK

Posted 18 August 2006 - 08:15 AM

Can you post the code again as it is now?

#7 kenwvs

kenwvs
  • Members
  • PipPipPip
  • Advanced Member
  • 194 posts

Posted 18 August 2006 - 08:17 AM

Will do.......the only change is the one I made to echo $sql

I will post it right away

#8 kenwvs

kenwvs
  • Members
  • PipPipPip
  • Advanced Member
  • 194 posts

Posted 18 August 2006 - 08:18 AM

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR...ml4/loose.dtd">
<html>
<head>
<title>GE Jenbacher</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="ge.css" rel="stylesheet" type="text/css">
<?php
include_once "myconnect.php";
$Contact = $_POST['Contact'];
// GEWOManager.php
?>
</head>
<body>
<div class="clearfix" id="mainbox"><!--Open Mainbox-->
<div id="header"<!--Open Header-->
<div id="headerleft"><h1>GE Jenbacher<BR><BR><span class="indent"> Work Order</span><BR></h1><!--Open Left Header-->
</div> <!--Close Left Header-->
<div id="headerright"><a href="#" title="GE Jenbacher">
<img src="leftimage.gif" alt="GE Jenbacher Right Image"
width="205" height="56" border="0" align="right"></a> <!--Open Right Header-->
</div>
</div> <!--Close Header-->
<div id="topnav"><!--Open Top Navigation-->
Manager Update <span class ="sub"><BR> (Assign a Purchase Order) </span>
</div><!--Close Top Navigation -->
<div id="content"><BR><BR><BR> <!--Open Content-->
<?php
$query=mysql_query("SELECT Work, Sched, Name, Site, Serial, Hours, Starts, Issue, Severity,
Resolution, Assistance, PartsA, PartsB, PartsC, PartsD, PartsE, PartsF, PartsG, Safety
FROM workorder WHERE Work='$Contact'");
if (!$query) {
    echo "YOU HAVE AN ERROR IN YOUR QUERY!<br>\n";
    echo mysql_error();
} else {
    $workorderInfo = mysql_fetch_assoc($query);
}
//this is just for testing
if (mysql_num_rows($query) == 0) {
    echo "No rows returned from table workorder using ID = '$Work'<br>\n";
}
?>
<?php
if (!isset($_POST['Submit']))
{
?>
<form action="" method="post" enctype="multipart/form-data">
<center><div>Purchase Order #:<input type="text" size="12" maxlength="12" name="Purchase"><BR><BR>
<div><B>Manager Comments:<BR><textarea rows="4" name="Comment" cols="80"></textarea>
</div></B><BR><BR>
<div>Work Order Number:<input type="text" value="<?php echo $workorderInfo['Work']; ?>" size="10" id="Work">
Date:<input type="text" value="<?php echo $workorderInfo['Sched']; ?>" size="10" id="Sched">
Technician:<input type="text" value="<?php echo $workorderInfo['Name']; ?> " size="25" id="Name"> <BR><BR>
Site:<input type="text" value="<?php echo $workorderInfo['Site']; ?>" size="20" id="Site">
Unit Serial Number:<input type="text" value="<?php echo $workorderInfo['Serial']; ?>" size="10" id="Serial">
Unit Hours:<input type="text" value="<?php echo $workorderInfo['Hours']; ?>" size="10" id="Hours">
<BR></><BR></>
Unit Starts:<input type="text" value="<?php echo $workorderInfo['Starts']; ?>" size="10" id="Starts">
Severity:<input type="text" value="<?php echo $workorderInfo['Severity']; ?>" size="25" id="Severe">
Safety:<input type="text" value="<?php echo $workorderInfo['Safety']; ?>" size="25" id="Safety">
</div> <BR>
<div><B>Description of Issue</B><BR>
<textarea id="Issue" rows="4" cols="80"><?php echo mysql_result($query, 0, 'Issue') ?></textarea></div><BR>
<div><B>Possible Resolution</B><BR>
<textarea id="Resolve" rows="4" cols="80"><?php echo mysql_result($query, 0, 'Resolution') ?></textarea></div><BR>
<div><B>List of Parts Required (one part per line)</B>:</div>
<div><input type="textbox" value="<?php echo $workorderInfo['PartsA']; ?>" size="80" maxlength="80" id="PartsA"><BR>
<input type="textbox" value="<?php echo $workorderInfo['PartsB']; ?>" size="80" maxlength="80" id="PartsB"><BR>
<input type="textbox" value="<?php echo $workorderInfo['PartsC']; ?>" size="80" maxlength="80" id="PartsC"><BR>
<input type="textbox" value="<?php echo $workorderInfo['PartsD']; ?>" size="80" maxlength="80" id="PartsD"><BR>
<input type="textbox" value="<?php echo $workorderInfo['PartsE']; ?>" size="80" maxlength="80" id="PartsE"><BR>
<input type="textbox" value="<?php echo $workorderInfo['PartsF']; ?>" size="80" maxlength="80" id="PartsF"><BR>
<input type="textbox" value="<?php echo $workorderInfo['PartsG']; ?>" size="80" maxlength="80" id="PartsG"><BR>
</div><BR>
<div><B>Request for Assistance:<BR>
<textarea id="Assist" rows="4" cols="80"><?php echo mysql_result($query, 0, 'Assistance') ?></textarea></div><BR>
<div><center><B>The Following people were advised of this Work Order:<BR>
<?php
$result = mysql_query("SELECT * FROM employees") or die(mysql_error());
echo "<select name='Tech'multiple>";
while($row=mysql_fetch_array($result))
{
  echo"<option>$row[Name]</option>";
}
  echo"</select>";
?></select><BR><BR><BR>
<div><input type="submit" name="Submit" value="Update Work Order"><BR><BR><BR><BR></center>
<input type="hidden" name="Contact" value="<?php echo $_POST['Contact']; ?>" />
</form>
</div>

</div><!--Close Content-->
<div id="footer"><!--Open Footer-->
Developed by Ken Van Someren - 2006<BR><!-- Open Footer -->
Permission must be granted for any and all use<BR>No Guarantees as to the reliability
or suitability of this document is provided.
<!-- Close Footer -->
</div><!-- Close Mainbox -->
<?php
exit();
}
else
{
$Purchase = $_POST["Purchase"];
$Comment = $_POST["Comment"];

$sql ="UPDATE `workorder` set Purchase = '$Purchase', Comment = '$Comment' WHERE work = '$Work'";
mysql_query($sql)or die(mysql_error());
echo $sql;
}
exit();
?>
<?php
//echo print_r($_POST)
?>
</body>
</html>


#9 GingerRobot

GingerRobot
  • Staff Alumni
  • Advanced Member
  • 4,086 posts
  • LocationUK

Posted 18 August 2006 - 08:22 AM

Can you modify and put in the code tags...makes it a lot easier to follow

#10 kenwvs

kenwvs
  • Members
  • PipPipPip
  • Advanced Member
  • 194 posts

Posted 18 August 2006 - 08:25 AM

OOPS, sorry

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>GE Jenbacher</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="ge.css" rel="stylesheet" type="text/css">
<?php
include_once "myconnect.php";
$Contact = $_POST['Contact'];
// GEWOManager.php
?>
</head>
<body>
<div class="clearfix" id="mainbox"><!--Open Mainbox-->
<div id="header"<!--Open Header-->
<div id="headerleft"><h1>GE Jenbacher<BR><BR><span class="indent"> Work Order</span><BR></h1><!--Open Left Header-->
</div> <!--Close Left Header-->
<div id="headerright"><a href="#" title="GE Jenbacher">
<img src="leftimage.gif" alt="GE Jenbacher Right Image"
width="205" height="56" border="0" align="right"></a> <!--Open Right Header-->
</div>
</div> <!--Close Header-->
<div id="topnav"><!--Open Top Navigation-->
Manager Update <span class ="sub"><BR> (Assign a Purchase Order) </span>
</div><!--Close Top Navigation -->
<div id="content"><BR><BR><BR> <!--Open Content-->
<?php
$query=mysql_query("SELECT Work, Sched, Name, Site, Serial, Hours, Starts, Issue, Severity,
Resolution, Assistance, PartsA, PartsB, PartsC, PartsD, PartsE, PartsF, PartsG, Safety 
FROM workorder WHERE Work='$Contact'");
if (!$query) {
    echo "YOU HAVE AN ERROR IN YOUR QUERY!<br>\n";
    echo mysql_error();
} else {
    $workorderInfo = mysql_fetch_assoc($query);
}
//this is just for testing
if (mysql_num_rows($query) == 0) {
    echo "No rows returned from table workorder using ID = '$Work'<br>\n";
}
?>
<?php
if (!isset($_POST['Submit']))
{
?>
<form action="" method="post" enctype="multipart/form-data">
<center><div>Purchase Order #:<input type="text" size="12" maxlength="12" name="Purchase"><BR><BR>
<div><B>Manager Comments:<BR><textarea rows="4" name="Comment" cols="80"></textarea>
</div></B><BR><BR>
<div>Work Order Number:<input type="text" value="<?php echo $workorderInfo['Work']; ?>" size="10" id="Work">
Date:<input type="text" value="<?php echo $workorderInfo['Sched']; ?>" size="10" id="Sched">
Technician:<input type="text" value="<?php echo $workorderInfo['Name']; ?> " size="25" id="Name"> <BR><BR>
Site:<input type="text" value="<?php echo $workorderInfo['Site']; ?>" size="20" id="Site">
Unit Serial Number:<input type="text" value="<?php echo $workorderInfo['Serial']; ?>" size="10" id="Serial">
Unit Hours:<input type="text" value="<?php echo $workorderInfo['Hours']; ?>" size="10" id="Hours">
<BR></><BR></>
Unit Starts:<input type="text" value="<?php echo $workorderInfo['Starts']; ?>" size="10" id="Starts">
Severity:<input type="text" value="<?php echo $workorderInfo['Severity']; ?>" size="25" id="Severe">
 Safety:<input type="text" value="<?php echo $workorderInfo['Safety']; ?>" size="25" id="Safety">
</div> <BR>
<div><B>Description of Issue</B><BR>
<textarea id="Issue" rows="4" cols="80"><?php echo mysql_result($query, 0, 'Issue') ?></textarea></div><BR>
<div><B>Possible Resolution</B><BR>
<textarea id="Resolve" rows="4" cols="80"><?php echo mysql_result($query, 0, 'Resolution') ?></textarea></div><BR>
<div><B>List of Parts Required (one part per line)</B>:</div>
<div><input type="textbox" value="<?php echo $workorderInfo['PartsA']; ?>" size="80" maxlength="80" id="PartsA"><BR>
<input type="textbox" value="<?php echo $workorderInfo['PartsB']; ?>" size="80" maxlength="80" id="PartsB"><BR>
<input type="textbox" value="<?php echo $workorderInfo['PartsC']; ?>" size="80" maxlength="80" id="PartsC"><BR>
<input type="textbox" value="<?php echo $workorderInfo['PartsD']; ?>" size="80" maxlength="80" id="PartsD"><BR>
<input type="textbox" value="<?php echo $workorderInfo['PartsE']; ?>" size="80" maxlength="80" id="PartsE"><BR>
<input type="textbox" value="<?php echo $workorderInfo['PartsF']; ?>" size="80" maxlength="80" id="PartsF"><BR>
<input type="textbox" value="<?php echo $workorderInfo['PartsG']; ?>" size="80" maxlength="80" id="PartsG"><BR>
</div><BR>
<div><B>Request for Assistance:<BR>
<textarea id="Assist" rows="4" cols="80"><?php echo mysql_result($query, 0, 'Assistance') ?></textarea></div><BR>
<div><center><B>The Following people were advised of this Work Order:<BR>
<?php
$result = mysql_query("SELECT * FROM employees") or die(mysql_error());
echo "<select name='Tech'multiple>";
while($row=mysql_fetch_array($result))
{
  echo"<option>$row[Name]</option>";
}
  echo"</select>";
?></select><BR><BR><BR>
<div><input type="submit" name="Submit" value="Update Work Order"><BR><BR><BR><BR></center>
<input type="hidden" name="Contact" value="<?php echo $_POST['Contact']; ?>" />
</form>
</div>

</div><!--Close Content-->
<div id="footer"><!--Open Footer-->
Developed by Ken Van Someren - 2006<BR><!-- Open Footer -->
Permission must be granted for any and all use<BR>No Guarantees as to the reliability
or suitability of this document is provided.
 <!-- Close Footer -->
</div><!-- Close Mainbox -->
<?php
exit();
}
 else
{
$Purchase = $_POST["Purchase"];
$Comment = $_POST["Comment"];

$sql ="UPDATE `workorder` set Purchase = '$Purchase', Comment = '$Comment' WHERE work = '$Work'";
mysql_query($sql)or die(mysql_error());
echo $sql;
}
exit();
?>
<?php
//echo print_r($_POST)
?>
</body>
</html>



#11 GingerRobot

GingerRobot
  • Staff Alumni
  • Advanced Member
  • 4,086 posts
  • LocationUK

Posted 18 August 2006 - 08:30 AM

A couple of things...did you say that when you go to this page you dont see the form? Make sure you are not just refreshing because you'll probably get the warning that you will be submitting information again(certainly if you are using Firefox or IE). You might have to close your browser and navigate back to the page.

Also, where are you defining $work?

#12 kenwvs

kenwvs
  • Members
  • PipPipPip
  • Advanced Member
  • 194 posts

Posted 18 August 2006 - 08:35 AM

I load up a login page (html page) and you key in the work order number.  When you press submit, it loads up this page with the data from the workorder number you keyed in.  The following codes are on this  page to define $work. 

$Contact = $_POST['Contact'];
  and then also

$query=mysql_query("SELECT Work, Sched, Name, Site, Serial, Hours, Starts, Issue, Severity,
Resolution, Assistance, PartsA, PartsB, PartsC, PartsD, PartsE, PartsF, PartsG, Safety 
FROM workorder WHERE Work='$Contact'");



#13 kenwvs

kenwvs
  • Members
  • PipPipPip
  • Advanced Member
  • 194 posts

Posted 18 August 2006 - 08:38 AM

Just a note that before I loaded the line

$sql ="UPDATE `workorder` set Purchase = '$Purchase', Comment = '$Comment' WHERE work = '$Work'";
mysql_query($sql)or die(mysql_error());
echo $sql;
 

when I keyed in a work order number, the form loaded with all the proper data from the DB.

Ken

#14 GingerRobot

GingerRobot
  • Staff Alumni
  • Advanced Member
  • 4,086 posts
  • LocationUK

Posted 18 August 2006 - 08:48 AM

So what is it actualyl happening at the moment?

Also, that still doesn't define $work. Unless you have register_globals on im pretty sure you're going to need to do

$work = $_POST['work'];

Unless $work isn't supposed to be the same as the work field in the form.

#15 kenwvs

kenwvs
  • Members
  • PipPipPip
  • Advanced Member
  • 194 posts

Posted 18 August 2006 - 08:52 AM

$work is the same as the work field form in the form.

When I run the form right now I get that error that says
UPDATE `workorder` set Purchase = '', Comment = '' WHERE work = ''

That is all that appears in the section of the page that would normally have the form.  The form iteself does not appear at all.

#16 GingerRobot

GingerRobot
  • Staff Alumni
  • Advanced Member
  • 4,086 posts
  • LocationUK

Posted 18 August 2006 - 09:00 AM

"When I run the form right now"

So you manage to use the form the first time the page loads, but after you submit it, you get that message?

Or do you never see the form at all?

Sorry, im just a bit unclear on that.

#17 kenwvs

kenwvs
  • Members
  • PipPipPip
  • Advanced Member
  • 194 posts

Posted 18 August 2006 - 09:08 AM

The form that you actually enter the original data in is different from the update form.

The form that you enter the existing work order number is a different form that directs you to this form when you key in the work order number.  So this is the first time this form is opened.

#18 kenwvs

kenwvs
  • Members
  • PipPipPip
  • Advanced Member
  • 194 posts

Posted 18 August 2006 - 09:11 AM

Form A you start the work order process.........1st form you complete

Form B is the form the manager reviews and assigns a purchase order and comments

Form C is the form where you login to the managers form

So this is how it works:

Employee completed Form A

The Manager completes Form C, which is simply a form field to input the work order # and is automatically sent to Form B, which has all the data from Form A in it, plus 2 additional fields.  One for Purchase Order and one for Manager comments.  These are the two fields that I can't get it to update.  These fields were not on the original form.  Should i be using insert instead of update?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users