BooRadLey'
I got the text area fields to working properly but I'm still struggling with the checkboxes. I'm afraid that your reply was a bit over my newbie head. I tried putting your code in the Value= attribute of the checkboxes, but that didn't work.
On the original insert form I use hidden inputs to preload the value of "N" into the ENUM ('Y','N') fields used by the checkboxes which are on an update form. When the update form is submitted with the checkboxes unchecked, I wish for these values to remain unchanged (as "N") rather being overwritten to blank as presently occurs when the form is submitted with the checkboxes unchecked. I tried writing some code that would reset the values in the fields back to the original values if the checkbox input isn't = "Y" , but it didn't work.
This is what the code looks like now (simplified to show only the part relating to the checkboxes)
<html><head><title></title></head>
<body>
<?
$id=$POST['id'];
$db="linkar";
//mysql_connect(localhost,$POST['username'],$_POST['pass']);
$conn = mysql_connect("localhost","root","triadpass");
if (! $conn)
die("Couldn't connect to MySQL");
mysql_select_db($db , $conn)
or die("Couldn't open $db: ".mysql_error());
$result=mysql_query(" SELECT * FROM linkdata WHERE id='$id'") or
die("SELECT Error: ".mysql_error());
$num=mysql_num_rows($result);
$i=0;
while ($i < $num) {
$linkedtoconf=mysql_result($result,$i,"linkedtoconf");
$linkedfromconf=mysql_result($result,$i,"linkedfromconf");
?>
<table width="300" cellpadding="10" cellspacing="0" border="2">
<tr align="center" valign="top">
<td align="center" colspan="1" rowspan="1" bgcolor="#64b1ff">
<h3>Edit and Submit</h3>
<form action="linkar_change_record.php" method="post">
<input type="hidden" name="username" value="<?php print
$POST['username']?>">
<input type="hidden" name="pass" value="<?php print $POST['pass']?>">
<input type="hidden" name="ud_id" value="<? echo "$id" ?>">
<p align="left" class="latext">
<p>Linked to Confirmed? <input type="checkbox"
name="ud_linkedtoconf" value="Y">
</p>
<p>Linked From Confirmed? <input
type="checkbox" name="ud_linkedfromconf" value="Y"></p>
</div>
<input type="Submit" value="Update">
</form>
</td></tr></table>
<?
++$i;
}
?>
</body>
</html>
//and the processing script:
<html><head><title></title></head>
<body>
<?
$user=$POST['username'];
$password=$POST['password'];
$ud_id=$_POST['ud_id'];
$ud_linkedtoconf=$POST['ud_linkedtoconf'];
$ud_linkedfromconf=$POST['ud_linkedfromconf'];
$db="linkar";
//$link =
mysql_connect("localhost",$POST['username'],$POST['password']);
$conn = mysql_connect("localhost","root","triadpass");
if (! $conn)
die("Couldn't connect to MySQL");
mysql_select_db($db , $conn)
or die("Couldn't open $db: ".mysql_error());
mysql_query(" UPDATE linkdata SET linkedtoconf='$ud_linkedtoconf',
linkedfromconf='$ud_linkedfromconf' WHERE id='$ud_id'");
echo "Record Updated";
mysql_close($conn);
?>
<form method="POST" action="linkar_update_form.php">
<input type="hidden" name="username" value="<?php print
$_POST['username']?>">
<input type="hidden" name="pass" value="<?php print
$_POST['password']?>">
<input type="submit" value="Change Another">
</form><br>
<form method="POST" action="linkar_dbase_interface.php">
<input type="hidden" name="username" value="<?php print
$_POST['username']?>">
<input type="hidden" name="pass" value="<?php print
$_POST['password']?>">
<input type="submit" value="Dbase Interface">
</form>
</body>
</html>
Thank you, Thank you