|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Dreamweaver Form error
Hello everyone, im very new to Dreamweaver and ive been trying to build an application with a mysql database, which i have already done. I can insert and retrieve data with no problems when i load the forms individually to the browser, but i get the error below when i load the whole site and try to use the navigation buttons.
This is what i get when i enter data into forms and hit insert record.... File Not Found Firefox can't find the file at /C:/wamp/www/mySite/WebPage/<?php echo $editFormAction; ?>. Thanks in advance for any help. Please Find the entire code here below: <?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 = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO account (AccountID, StartDate, EndDate, TotalSold, EmployeeID) VALUES (%s, %s, %s, %s, %s)", GetSQLValueString($_POST['AccountID'], "int"), GetSQLValueString($_POST['StartDate'], "date"), GetSQLValueString($_POST['EndDate'], "date"), GetSQLValueString($_POST['TotalSold'], "text"), GetSQLValueString($_POST['EmployeeID'], "int")); mysql_select_db($database_DBFits, $DBFits); $Result1 = mysql_query($insertSQL, $DBFits) or die(mysql_error()); $insertGoTo = "AccountsDetails.php?AccountID=" . $row_Accounts['AccountID'] . ""; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } mysql_select_db($database_DBFits, $DBFits); $query_Accounts = "SELECT * FROM account ORDER BY AccountID ASC"; $Accounts = mysql_query($query_Accounts, $DBFits) or die(mysql_error()); $row_Accounts = mysql_fetch_assoc($Accounts); $totalRows_Accounts = mysql_num_rows($Accounts); ?> |
![]() |
| Viewing: Tutorialized Forums > Web Design & Development > Dreamweaver > Dreamweaver Form error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|