Forum Moderators: coopster
Below I have the code that I have thus far. Dreamweaver has helped to create a good deal of this code. It worked when I was only using one form, but now I have separated the first two values(EmpNo and ProjectID) into their own form called 'form4'. I would like for the code to get the values from the new form. Any ideas?
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form3" )) {
$insertSQL = sprintf("INSERT INTO assignments (empNo, projectID, roleID, active, dateFrom, dateTo, January, February, March, April, May, June, July, August, September, October, November, December) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['EmpNo'], "text"),
GetSQLValueString($_POST['ProjectID'], "int"),
GetSQLValueString($_POST['roleID'], "int"),
GetSQLValueString($_POST['active'], "text"),
GetSQLValueString($_POST['dateFrom'], "date"),
GetSQLValueString($_POST['dateTo'], "date"),
GetSQLValueString($_POST['January'], "double"),
GetSQLValueString($_POST['February'], "double"),
GetSQLValueString($_POST['March'], "double"),
GetSQLValueString($_POST['April'], "double"),
GetSQLValueString($_POST['May'], "double"),
GetSQLValueString($_POST['June'], "double"),
GetSQLValueString($_POST['July'], "double"),
GetSQLValueString($_POST['August'], "double"),
GetSQLValueString($_POST['September'], "double"),
GetSQLValueString($_POST['October'], "double"),
GetSQLValueString($_POST['November'], "double"),
GetSQLValueString($_POST['December'], "double"));
if you want to include those fields then you would have to write them into the other form as hidden fields, but if they have no values then that won't help
you could use javascript maybe to set the 2 hidden fields to the values entered in the other upon submission of the form