o.k So here we go then ;; :-) evil smile
this is my link on my listing of records in my database I have one record
trying to pass the Id to an update form but it always sees the first record
and nothing else here is what I have (snips)
orderlist.php
Looking at this line for Click on Company name: (snipped from below)
<a href=Updaterecord.php?id=<? echo $row_Recordset1['id'] ?>"
target=iframelist ><?php echo $row_Recordset1['companyname']; ?></div>
*** ( all of the code ) ***
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['id']; ?></td>
<td width="52"><div align="center" class="style4"><a
href="Select.php">Delete</a></div></td>
<td width="85"><?php echo $row_Recordset1['ordernumber']; ?></td>
<td bgcolor="#CCCCCC"><div align="center" class="style4">
<div align="left"><a href=Updaterecord.php?id=<? echo
$row_Recordset1['id'] ?>" target=iframelist ><?php echo
$row_Recordset1['companyname']; ?></div>
</div></td>
<td bgcolor="#CCCCCC"><div align="center" class="style4"><?php echo
$row_Recordset1['Customer']; ?>;</div></td>
<td bgcolor="#CCCCCC"><div align="center" class="style4"><?php echo
$row_Recordset1['Startdate']; ?></div></td>
<td bgcolor="#CCCCCC"><div align="center" class="style4"><?php echo
$row_Recordset1['Completedate']; ?></div></td>
<td bgcolor="#CCCCCC"><div align="center" class="style4"><?php echo
$row_Recordset1['Biddate']; ?></div></td>
<td bgcolor="#CCCCCC"><div align="center" class="style4"><?php echo
$row_Recordset1['Bidamount']; ?></div></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
<iframe name="iframelist" frameborder="0" src="defaultlist.php"
height="550" width="820" ><font color="#000099"></font></iframe>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
( Updaterecord.php )
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE workorders SET id=%s, ordernumber=%s,
billingaddress=%s, City=%s, `State`=%s, Zip=%s, PhoneNumber=%s,
FaxNumber=%s, WebPage=%s, EmailAddress=%s, Notes=%s, Customer=%s,
Startdate=%s, Completedate=%s, Biddate=%s, Bidamount=%s, ElecProjCost=%s,
ElecProjBill=%s, ElecRem=%s, CtrlProjCost=%s, CtrlProjBill=%s,
CtrlProjrem=%s, OthrProjCost=%s, OthrProjBill=%s, OthrProjrem=%s,
AllRemainSum=%s, BondAm=%s, BondBill=%s, BondRem=%s WHERE companyname=%s",
GetSQLValueString($_POST['id'], "int"),
GetSQLValueString($_POST['ordernumber'], "text"),
GetSQLValueString($_POST['billingaddress'], "text"),
GetSQLValueString($_POST['City'], "text"),
GetSQLValueString($_POST['State'], "text"),
GetSQLValueString($_POST['Zip'], "text"),
GetSQLValueString($_POST['PhoneNumber'], "text"),
GetSQLValueString($_POST['FaxNumber'], "text"),
GetSQLValueString($_POST['WebPage'], "text"),
GetSQLValueString($_POST['EmailAddress'], "text"),
GetSQLValueString($_POST['Notes'], "text"),
GetSQLValueString($_POST['Customer'], "text"),
GetSQLValueString($_POST['Startdate'], "text"),
GetSQLValueString($_POST['Completedate'], "text"),
GetSQLValueString($_POST['Biddate'], "text"),
GetSQLValueString($_POST['Bidamount'], "text"),
GetSQLValueString($_POST['ElecProjCost'], "text"),
GetSQLValueString($_POST['ElecProjBill'], "text"),
GetSQLValueString($_POST['ElecRem'], "text"),
GetSQLValueString($_POST['CtrlProjCost'], "text"),
GetSQLValueString($_POST['CtrlProjBill'], "text"),
GetSQLValueString($_POST['CtrlProjrem'], "text"),
GetSQLValueString($_POST['OthrProjCost'], "text"),
GetSQLValueString($_POST['OthrProjBill'], "text"),
GetSQLValueString($_POST['OthrProjrem'], "text"),
GetSQLValueString($_POST['AllRemainSum'], "int"),
GetSQLValueString($_POST['BondAm'], "text"),
GetSQLValueString($_POST['BondBill'], "text"),
GetSQLValueString($_POST['BondRem'], "text"),
GetSQLValueString($_POST['companyname'], "text"));
mysql_select_db($database_idata, $idata);
$Result1 = mysql_query($updateSQL, $idata) or die(mysql_error());
$updateGoTo = "ListerForm.php";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
}
mysql_select_db($database_idata, $idata);
$query_DetailRS1 = "SELECT * FROM workorders";
$DetailRS1 = mysql_query($query_DetailRS1, $idata) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($DetailRS1);
$totalRows_DetailRS1 = mysql_num_rows($DetailRS1);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form method="post" name="form1" action="<?php echo $editFormAction; ?>">
<table align="center">
<tr valign="baseline">
<td nowrap align="right">Ordernumber:</td>
<td><input type="text" name="ordernumber" value="<?php echo
$row_Recordset1['ordernumber']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Companyname:</td>
<td><?php echo $row_Recordset1['companyname']; ?></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Billingaddress:</td>
<td><input type="text" name="billingaddress" value="<?php echo
$row_Recordset1['billingaddress']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">City:</td>
<td><input type="text" name="City" value="<?php echo
$row_Recordset1['City']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">State:</td>
<td><input type="text" name="State" value="<?php echo
$row_Recordset1['State']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Zip:</td>
<td><input type="text" name="Zip" value="<?php echo
$row_Recordset1['Zip']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">PhoneNumber:</td>
<td><input type="text" name="PhoneNumber" value="<?php echo
$row_Recordset1['PhoneNumber']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">FaxNumber:</td>
<td><input type="text" name="FaxNumber" value="<?php echo
$row_Recordset1['FaxNumber']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">WebPage:</td>
<td><input type="text" name="WebPage" value="<?php echo
$row_Recordset1['WebPage']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">EmailAddress:</td>
<td><input type="text" name="EmailAddress" value="<?php echo
$row_Recordset1['EmailAddress']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Notes:</td>
<td><input type="text" name="Notes" value="<?php echo
$row_Recordset1['Notes']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Customer:</td>
<td><input type="text" name="Customer" value="<?php echo
$row_Recordset1['Customer']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Startdate:</td>
<td><input type="text" name="Startdate" value="<?php echo
$row_Recordset1['Startdate']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Completedate:</td>
<td><input type="text" name="Completedate" value="<?php echo
$row_Recordset1['Completedate']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Biddate:</td>
<td><input type="text" name="Biddate" value="<?php echo
$row_Recordset1['Biddate']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Bidamount:</td>
<td><input type="text" name="Bidamount" value="<?php echo
$row_Recordset1['Bidamount']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">ElecProjCost:</td>
<td><input type="text" name="ElecProjCost" value="<?php echo
$row_Recordset1['ElecProjCost']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">ElecProjBill:</td>
<td><input type="text" name="ElecProjBill" value="<?php echo
$row_Recordset1['ElecProjBill']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">ElecRem:</td>
<td><input type="text" name="ElecRem" value="<?php echo
$row_Recordset1['ElecRem']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">CtrlProjCost:</td>
<td><input type="text" name="CtrlProjCost" value="<?php echo
$row_Recordset1['CtrlProjCost']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">CtrlProjBill:</td>
<td><input type="text" name="CtrlProjBill" value="<?php echo
$row_Recordset1['CtrlProjBill']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">CtrlProjrem:</td>
<td><input type="text" name="CtrlProjrem" value="<?php echo
$row_Recordset1['CtrlProjrem']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">OthrProjCost:</td>
<td><input type="text" name="OthrProjCost" value="<?php echo
$row_Recordset1['OthrProjCost']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">OthrProjBill:</td>
<td><input type="text" name="OthrProjBill" value="<?php echo
$row_Recordset1['OthrProjBill']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">OthrProjrem:</td>
<td><input type="text" name="OthrProjrem" value="<?php echo
$row_Recordset1['OthrProjrem']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">AllRemainSum:</td>
<td><input type="text" name="AllRemainSum" value="<?php echo
$row_Recordset1['AllRemainSum']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">BondAm:</td>
<td><input type="text" name="BondAm" value="<?php echo
$row_Recordset1['BondAm']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">BondBill:</td>
<td><input type="text" name="BondBill" value="<?php echo
$row_Recordset1['BondBill']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right">BondRem:</td>
<td><input type="text" name="BondRem" value="<?php echo
$row_Recordset1['BondRem']; ?>" size="32"></td>
</tr>
<tr valign="baseline">
<td nowrap align="right"> </td>
<td><input type="submit" value="Update record"></td>
</tr>
</table>
<input type="hidden" name="id" value="<?php echo
$row_Recordset1['companyname']; ?>">
<input type="hidden" name="MM_update" value="form1">
<input type="hidden" name="companyname" value="<?php echo
$row_Recordset1['companyname']; ?>">
</form>
<p> </p>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
_____
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Mike
Sent: Friday, October 27, 2006 3:47 PM
To: [email protected]
Subject: Re: [php_mysql] MySQL help BAD
Brian
The confirmation code you entered was incorrect
There is no place to put in a confirmation code
----- Original Message -----
From: "Brian E Boothe" <HYPERLINK
"mailto:subrian%40mtcnet.net"[EMAIL PROTECTED]>
To: <HYPERLINK
"mailto:php_mysql%40yahoogroups.com"[EMAIL PROTECTED]>
Sent: Friday, October 27, 2006 3:38 PM
Subject: [php_mysql] MySQL help BAD
HI all
Im needing Some assistance in a few Really big project's , I'm currently
working on If u could Please Visit http;//www.sucontro-l.com/Forum/ and
Join me ill explain better,
thank u very much
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.13/500 - Release Date: 10/26/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.16/504 - Release Date: 10/27/2006
[Non-text portions of this message have been removed]
The php_mysql group is dedicated to learn more about the PHP/MySQL web
database possibilities through group learning.
Yahoo! Groups Links
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.408 / Virus Database: 268.13.16/504 - Release Date: 10/27/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.22/512 - Release Date: 11/1/2006
[Non-text portions of this message have been removed]
The php_mysql group is dedicated to learn more about the PHP/MySQL web database
possibilities through group learning.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php_mysql/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/php_mysql/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/