Inserting Blank Record
I can't seem to figure out why this form is only inserting a blank record. The form returns no errors and does not insert the form values but it inserts a empty record into the db. I just can't find where it's gone wrong.
I can't seem to figure out why this form is only inserting a blank record. The form returns no errors and does not insert the form values but it inserts a empty record into the db. I just can't find where it's gone wrong.
to troubleshoot, change this line:
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
to:
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
echo("<pre>".var_dump($_POST)."</pre><br>");
die("SQL: ".$WA_Sql);
this will write the contents of the post and the Insert SQL Statement to the screen, post this information back.
Thanks Jason,
The result indicates that nothing is being inserted into the values.
array(9) { ["Registration_group_Company_Name"]=> string(12) "Temp Company" ["Registration_group_Company_Abbrev"]=> string(5) "tcomp" ["Registration_group_Email"]=> string(16) "temp@company.com" ["Registration_group_Address"]=> string(3) "999" ["Registration_group_Address_2"]=> string(0) "" ["Registration_group_City"]=> string(4) "9999" ["Registration_group_Province"]=> string(7) "Alberta" ["Registration_group_Postal_Code"]=> string(7) "L6V 4L2" ["Registration_submit"]=> string(11) "Add Company" }
SQL: INSERT INTO `companies` (`CompanyName`,`CompanyAbbrev`,`CompanyAddress1`,`CompanyAddress2`,`CompanyCity`,`CompanyZip`,`CompanyEmail`,`CompanyState`,`CompanyCountry`) VALUES ('','','','','','','','','')
But the field names are correct. I can not see why the field values are not being passed
I have created a support ticket so we can look into this issue further.
To view and edit your support ticket, please log into your support history:
supporthistory.php
If anyone else is experiencing this same issue, please append to this thread.
Turns out, I neglected to upload all of the necessary WA files that were to be included with the page for validation.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.