![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, My page works BUT when in design view, in the server behavior panel, there is a red exclamation mark next to the Record Update behavior. I've opened it and checked all the values and made sure the redirect page (which works) is correct. Can't see anything wrong. Is there a way to get DW to tell you what the ! mark is refering to? In other instances it has by saying such and such a field not found if I changed the name in the database or something. Everything works but that ! is driving me nuts. I know something is going to come back and bite me later. Page loads with no error messages. PHP4.7.3/MySQL database updates fine with no error messages. I get sent to the redirect page with no errors. There is only one Start_Session() in the code. Using DWMX2004 with update. Is DW inserting updated PHP code? Maybe I'm overlooking something. Here is the code that is highlighted when I click on the Update Record behavior: ?php function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $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 = $HTTP_SERVER_VARS['PHP_SELF']; if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { $editFormAction .= "?" . $HTTP_SERVER_VARS['QUERY_STRING']; } if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "UpdateUserInfo")) { $updateSQL = sprintf("UPDATE login SET FirstName=%s, LastName=%s, HomePhone=%s, UserName=%s, Email=%s, UserUpdateInfoDate=%s WHERE UserID=%s", GetSQLValueString($HTTP_POST_VARS['FirstName'], "text"), GetSQLValueString($HTTP_POST_VARS['LastName'], "text"), GetSQLValueString($HTTP_POST_VARS['HomePhone'], "text"), GetSQLValueString($HTTP_POST_VARS['UserName'], "text"), GetSQLValueString($HTTP_POST_VARS['Email'], "text"), GetSQLValueString($HTTP_POST_VARS['UserUpdateInfoDate'], "text"), GetSQLValueString($HTTP_POST_VARS['UserID'], "int")); mysql_select_db($database_DMInfo, $DMInfo); $Result1 = mysql_query($updateSQL, $DMInfo) or die(mysql_error()); $updateGoTo = "User_Confirm_Info.php"; if (isset($_SERVER['QUERY_STRING'])) { $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?"; $updateGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $updateGoTo)); } $colname_rsUpdateUserInfo = "1"; if (isset($_SESSION['UserID'])) { $colname_rsUpdateUserInfo = (get_magic_quotes_gpc()) ? $_SESSION['UserID'] : addslashes($_SESSION['UserID']); } mysql_select_db($database_DMInfo, $DMInfo); $query_rsUpdateUserInfo = sprintf("SELECT UserID, FirstName, LastName, HomePhone, UserName, Email FROM login WHERE UserID = %s", $colname_rsUpdateUserInfo); $rsUpdateUserInfo = mysql_query($query_rsUpdateUserInfo, $DMInfo) or die(mysql_error()); $row_rsUpdateUserInfo = mysql_fetch_assoc($rsUpdateUserInfo); $totalRows_rsUpdateUserInfo = mysql_num_rows($rsUpdateUserInfo); ? Thanks. Leesa |
#3
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |