Copy link to clipboard
Copied
Okay back and recreated the form!
After close encounter with the htm and php source code confusion I have just concerntrated on saving the file. Its only PHP source file.
Link to the new page from scratch!
www.phpzend.co.uk/Registerpage.php
1. No Errors!
2. Ran HTML validator against this page and I get 1 Output error -
3. As you can see just the these workflow alone generates an error on its own. I called it a BUG.
4. As you can see the form, but click on Submit it does not go to the page as required, that is Reportbyall.php.
Please advise.
I have filed a BUG REPORT. So will hope they fix it pretty quickly and send us an upgrade.
Copy link to clipboard
Copied
Just to add the new page source code (php)
<?php require_once('Connections/dbAttendance.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$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_insert"])) && ($_POST["MM_insert"] == "form")) {
$insertSQL = sprintf("INSERT INTO attendlist (Windowsid, title, firstname, surname, extension, mobile, jobrole, course, cpg, mgrname, room) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['textfield'], "text"),
GetSQLValueString($_POST['select'], "text"),
GetSQLValueString($_POST['textfield2'], "text"),
GetSQLValueString($_POST['textfield3'], "text"),
GetSQLValueString($_POST['textfield4'], "text"),
GetSQLValueString($_POST['textfield5'], "text"),
GetSQLValueString($_POST['select2'], "text"),
GetSQLValueString($_POST['select3'], "text"),
GetSQLValueString($_POST['select4'], "text"),
GetSQLValueString($_POST['textfield6'], "text"),
GetSQLValueString($_POST['textfield7'], "text"));
mysql_select_db($database_dbAttendance, $dbAttendance);
$Result1 = mysql_query($insertSQL, $dbAttendance) or die(mysql_error());
$insertGoTo = "ReportbyAll.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
mysql_select_db($database_dbAttendance, $dbAttendance);
$query_rsReg = "SELECT * FROM attendlist";
$rsReg = mysql_query($query_rsReg, $dbAttendance) or die(mysql_error());
$row_rsReg = mysql_fetch_assoc($rsReg);
$totalRows_rsReg = mysql_num_rows($rsReg);
?>
<!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>Delegate Register</title>
<link href="Registerpage.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<script src="SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
</head>
<body>
<div class="container">
<div class="header"><img src="Cerner At Imperial2.jpg" width="960" height="150" alt="" /><!-- end .header --></div>
<div class="content">
<h3>Register: <?php echo "Date".date("d/m/Y")?></h3>
<form method="POST" action="<?php echo $editFormAction; ?>" name="form">
<table width="780" border="0">
<tr>
<td><div align="right">User ID *</div></td>
<td><span id="sprytextfield1">
<input name="textfield" type="text" id="textfield" tabindex="1" size="18" maxlength="10" />
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
<td> </td>
</tr>
<tr>
<td><div align="right">Title *</div></td>
<td><span id="spryselect1">
<select name="select" id="select" tabindex="2">
<option value="0">Select</option>
<option value="1">Ms</option>
<option value="2">Mrs</option>
<option value="3">Mdm</option>
<option value="4">Dr</option>
<option value="5">Mr</option>
<option value="6">Prof</option>
</select>
<span class="selectRequiredMsg">Please select an item.</span></span></td>
<td> </td>
</tr>
<tr>
<td><div align="right">First name*</div></td>
<td><span id="sprytextfield2">
<input name="textfield2" type="text" id="textfield2" tabindex="3" size="30" maxlength="30" />
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
<td> </td>
</tr>
<tr>
<td><div align="right">Surname *</div></td>
<td><span id="sprytextfield3">
<input name="textfield3" type="text" id="textfield3" tabindex="4" size="30" maxlength="30" />
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
<td> </td>
</tr>
<tr>
<td><div align="right">Contact / Bleep *</div></td>
<td><span id="sprytextfield4">
<input name="textfield4" type="text" id="textfield4" tabindex="5" size="30" maxlength="30" />
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
<td> </td>
</tr>
<tr>
<td><div align="right">Mobile no: (optional)*</div></td>
<td><input name="textfield5" type="text" id="textfield5" tabindex="6" size="20" maxlength="20" /></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td><div align="right">Job Role *</div></td>
<td><span id="spryselect5">
<select name="select5" id="select5" tabindex="7">
<option value="0">Select </option>
<option value="1">Doctor</option>
<option value="2">Nurse IP</option>
<option value="3">Nurse OP</option>
<option value="4">Midwife</option>
<option value="5">Booking Clerk</option>
<option value="6">Medical Secretary</option>
<option value="7">OP Receptionist</option>
<option value="9">CNS/NP</option>
<option value="10">Tester</option>
</select>
<span class="selectRequiredMsg">Please select an item.</span></span></td>
<td> </td>
</tr>
<tr>
<td><div align="right">Manager's Name *</div></td>
<td><span id="sprytextfield5">
<input name="textfield7" type="text" id="textfield7" tabindex="8" size="30" maxlength="30" />
<span class="textfieldRequiredMsg">A value is required.</span></span></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td><div align="right">Course *</div></td>
<td><span id="spryselect2">
<select name="select2" id="select2" tabindex="9">
<option value="0">Select</option>
<option value="1">Demo</option>
<option value="2">Doctors</option>
<option value="9">CNS/NP</option>
<option value="3">Nurse IP</option>
<option value="4">Nurse OP</option>
<option value="5">Midwife</option>
<option value="6">Booking Clerk</option>
<option value="7">Medical Secretary</option>
<option value="8">OP Receptionist</option>
</select>
<span class="selectRequiredMsg">Please select an item.</span></span></td>
<td> </td>
</tr>
<tr>
<td><div align="right">Location *</div></td>
<td><span id="spryselect3">
<select name="select3" id="select3" tabindex="10">
<option value="0">Select </option>
<option value="1">CHX 12 Floor Rm 1</option>
<option value="2">CHX 12 Floor Rm 2</option>
<option value="3">CHX 10 West </option>
<option value="4">HH N207 </option>
<option value="5">HH W12 Conference</option>
<option value="6">SMH Rm a</option>
<option value="7">SMH Rm b</option>
<option value="8">SMH Ming Wing Rm 5</option>
<option value="9">SMH Ming Wing Rm 3</option>
</select>
<span class="selectRequiredMsg">Please select an item.</span></span></td>
<td> </td>
</tr>
<tr>
<td><div align="right">CPG *</div></td>
<td><span id="spryselect4">
<select name="select4" id="select4" tabindex="11">
<option value="0">Select </option>
<option value="1">CPG 1 - Medicine</option>
<option value="2">CPG 2 - Surgery and Cancer</option>
<option value="3">CPG 3 - Specialist Services </option>
<option value="4">CPG 4 - Circulatory Services and Renal Medicine</option>
<option value="5">CPG 5 - Womens and Children</option>
<option value="6">CPG 6 - Clinical and Investigative Sciences</option>
<option value="7">CPG 7 - Private Patients</option>
<option value="8">Others</option>
</select>
<span class="selectRequiredMsg">Please select an item.</span></span></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><input name="button" type="button" id="button" value="Submit" /></td>
<td> </td>
</tr>
<tr>
<td><div align="center">*Mandatory fields </div></td>
<td> </td>
<td> </td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form" />
</form>
<!-- end .content --></div>
<div class="footer">
<p> </p>
<!-- end .footer --></div>
<!-- end .container --></div>
<script type="text/javascript">
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["blur", "change"]});
var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1", {validateOn:["change", "blur"]});
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none", {validateOn:["blur", "change"]});
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "none", {validateOn:["blur", "change"]});
var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "none", {validateOn:["blur", "change"]});
var spryselect2 = new Spry.Widget.ValidationSelect("spryselect2", {validateOn:["change", "blur"]});
var spryselect3 = new Spry.Widget.ValidationSelect("spryselect3", {validateOn:["change", "blur"]});
var spryselect4 = new Spry.Widget.ValidationSelect("spryselect4", {validateOn:["change", "blur"]});
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "none", {validateOn:["blur", "change"]});
var spryselect5 = new Spry.Widget.ValidationSelect("spryselect5", {validateOn:["blur", "change"]});
</script>
</body>
</html>
<?php
mysql_free_result($rsReg);
?>
Copy link to clipboard
Copied
Here is what the validtor says about the code generated by DW
There is proof that this is in the source code (php).
Tell me this is NOT a bug with the code-generator. It should be lowercase post in this case but I get capitalised (captialized) POST instead.
Copy link to clipboard
Copied
So make it lower case as the validator suggests.
Then report the bug (and the exact steps you took to bring it to light) to Adobe here: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
Copy link to clipboard
Copied
This is what I have done. I edited the only copy. Source code (php). Changed the capitalized POST to lowercase post. Save it and NOT save as ...
I notice too that the panel, annotated panel has a captialized POST, this is (is it not) cause if user inserted this by hand coding. I didnt hand code this. It is code-generated by Adobe Dreamweaver's code generation engine. So this is where engineering should rectify this. Change POST to post. Check also your get? I think I saw it as capitalized as well GET.
So this is how I rectify it. Open up the only source code (PHP), change the capitalized POST to lowercase post. Save it. Ran the validator again. I have included the successful - NO ERRORS screen shot of the validator (after this screen)
Validator Screen Short of the steps taken above to rectify the source code(PHP). Now this is my intervention to rectify it. Please could be fixed as schemas will change, the workflow will require changes in the database schema and tables and hence changes impacts on the source code (PHP)
Copy link to clipboard
Copied
This was brought to light when Murray and I was discussing at length the form I was working from. It is in the general post. Read it. Gave me a good reason to recreate the whole form, started from scratch and now here the bug exposed.
Copy link to clipboard
Copied
File a bug report at the link I posted above, actual Adobe reps very rarely visit this user-to-user forum.
Copy link to clipboard
Copied
Hi Jon,
Thanks. I will do.
As we have cleared this bug. The submit button does not go forth to the page. Despite no errors!
Thanks.
Copy link to clipboard
Copied
I have filed a BUG REPORT. So will hope they fix it pretty quickly and send us an upgrade.