Ok. I decided to create a set of simple sample pages using ONLY Dreamweaver CS3. The following are what I came up with. I hope they help. :)
page1.php ( Find Record Form )
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
<form action="page2.php" method="post">
<table>
<tr>
<td nowrap="nowrap">Enter Email Address:</td>
<td> </td><td><input name="email" type="text" size="30" /></td>
<td> </td><td><input type="submit" value="Go" /></td>
</tr>
</table>
</form>
</body>
</html>
page2.php - ( Update Record )
<?php require_once('../Connections/dbconnect.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "update")) {
$updateSQL = sprintf("UPDATE users SET FirstName=%s, LastName=%s WHERE UserID=%s",
GetSQLValueString($_POST['fname'], "text"),
GetSQLValueString($_POST['lname'], "text"),
GetSQLValueString($_POST['id'], "int"));
mysql_select_db($database_dbconnect, $dbconnect);
$Result1 = mysql_query($updateSQL, $dbconnect) or die(mysql_error());
$updateGoTo = "page1.php";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
}
$colname_getUsers = "-1";
if (isset($_POST['email'])) {
$colname_getUsers = (get_magic_quotes_gpc()) ? $_POST['email'] : addslashes($_POST['email']);
}
mysql_select_db($database_dbconnect, $dbconnect);
$query_getUsers = sprintf("SELECT * FROM users WHERE UserEmail = %s", GetSQLValueString($colname_getUsers, "text"));
$getUsers = mysql_query($query_getUsers, $dbconnect) or die(mysql_error());
$row_getUsers = mysql_fetch_assoc($getUsers);
$totalRows_getUsers = mysql_num_rows($getUsers);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
<h3>Update User: <?php echo $row_getUsers['UserEmail']; ?></h3>
<hr />
<form action="<?php echo $editFormAction; ?>" method="POST" name="update">
<table>
<tr>
<td>First name:</td><td> </td><td><input name="fname" type="text" value="<?php echo $row_getUsers['FirstName']; ?>" size="30" /></td>
</tr>
<tr>
<td>Last name:</td><td> </td><td><input name="lname" type="text" value="<?php echo $row_getUsers['LastName']; ?>" size="30" /></td>
</tr>
</table>
<table>
<tr>
<td><input type="submit" value="Save" />
<input name="id" type="hidden" value="<?php echo $row_getUsers['UserID']; ?>" /></td>
</tr>
</table>
<input type="hidden" name="MM_update" value="update" />
</form>
</body>
</html>
<?php
mysql_free_result($getUsers);
?>