Newbies ethangj Posted February 24, 2009 Newbies Posted February 24, 2009 (edited) Hope this is the right place. I'm trying to do a simple query to write a record from a web form. The problem is for some reason with my full field list in the query, it fails. If I cut it to about 1/3rd it works, by going down and deleting one field at a time and trying it, I was able to find out that 1/3rd + some of the fields works, but most of the time as soon as I add any of them it gives me the error trap. The fields are a mixture of radio buttons, checkboxes, dropdowns, and text fields. Here is my posted value list as well as my query. $fname = $_POST['fname']; $MID = $_POST['MID']; $lname = $_POST ['lname']; $AddressType = $_POST ['AddressType']; $Address1 = $_POST['Address1']; $Address2 = $_POST['Address2']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; $AlternateAddress1 = $_POST['AlternateAddress1']; $AlternateAddress2 = $_POST['AlternateAddress2']; $AlternateAddressCity = $_POST['AlternateAddressCity']; $AlternateAddressState = $_POST['AlternateAddressState']; $AlternateAddressZip = $_POST['AlternateAddressZip']; $School = $_POST['School']; $Phone1 = $_POST['Phone1']; $Phone2 = $_POST['Phone2']; $Phone3 = $_POST['Phone3']; $FAX = $_POST['FAX']; $email = $_POST['email']; $email2 = $_POST['email2']; $Website = $_POST['Website']; $Company = $_POST['Company']; $cctype = $_POST['cctype']; $ccnumber = $_POST['ccnumber']; $ccmonth = $_POST['ccmonth']; $ccyear = $_POST['ccyear']; $cccvv = $_POST['cccvv']; $country = $_POST['country']; $NDBelongToOther = $_POST['NDBelongToOther']; $NDwhich = $_POST['NDwhich']; $ND_hold_offce = $_POST['ND_hold_office']; $NDBackgroundSkill_y_n = $_POST['NDBackgroundSkill_y_n']; $NDBackgroundSkill = $_POST['NDBackgroundSkill']; $ND_Interested = $_POST['ND_Interested']; $ND_Prime_Pub_Polcy = $_POST['ND_Prime_Pub_Polcy']; $NDEducation = $_POST['NDEducation']; $ND_Any_Rel = $_POST['ND_Any_Rel']; $ND_any_rel_who = $_POST['ND_any_rel_who']; $NDLeaseProp = $_POST['NDLeaseProp']; $NDLeasePropAcres = $_POST['NDLeasePropAcres']; $NDLeasedPropFence = $_POST['NDLeasedPropFence']; $NDPropEvent = $_POST['NDPropEvent']; $NDOwnPropWildlife = $_POST['NDOwnPropWildlife']; $NDAcres = $_POST['NDAcres']; $NDWildlife_game = $_POST['NDWildlife_game']; $NDOwnedProp = $_POST['NDOwnedProp']; $NDLivestockType = $_POST['NDLivestockType']; $NDOwnPropFence = $_POST['NDOwnPropFence']; and require_once('Connections/mainmenu.php'); $newmember_add = $mainmenu->newAddCommand('New Members'); $newmember_fields = array( 'FNAME'=>$fname, 'MID'=>$MID, 'LastName'=>$lname, 'Address1'=>$Address1, 'Address2'=>$Address2, 'CITY'=>$city, 'STATE'=>$state, 'ZIP'=>$zip, 'Phone1'=>$Phone1, 'Phone2'=>$Phone2, 'Phone3'=>$Phone3, 'FAX'=>$FAX, 'EMAIL'=>$email, 'EMAIL2'=>$email2, 'REFERENCE'=>$REFERENCE, 'MEMTYPE'=>$MEMTYPE, 'WhoIsMember'=>$WhoIsMember, 'Phone1 Type'=>$Phone1_Type, 'Phone2 Type'=>$Phone2_Type, 'Phone3 Type'=>$Phone3_Type, 'AlternateAddress1'=>$AlternateAddress1, 'AlternateAddress2'=>$AlternateAddress2, 'AlternateAddressType'=>$AlternateAddressType, 'AlternateAddressCity'=>$AlternateAddressCity, 'AlternateAddressState'=>$AlternateAddressState, 'AlternateAddressZip'=>$AlternateAddressZip, 'AlternateAddress1P'=>$AlternateAddress1P, 'AlternateAddress2P'=>$AlternateAddress2P, 'AlternateAddressTypeP'=>$AlternateAddressTypeP, 'AlternateAddressCityP'=>$AlternateAddressCityP, 'AlternateAddressStateP'=>$AlternateAddressStateP, 'AlternateAddressZipP'=>$AlternateAddressZipP, 'NewRenew'=>$NewRenew, 'NewRate'=>$NewRate, 'Company'=>$Company, 'Website'=>$Website, 'credit_card_type'=>$cctype, 'credit_card_number'=>$ccnumber, 'credit_card_month'=>$ccmonth, 'credit_card_year'=>$ccyear, 'credit_card_country'=>$country, 'credit_card_cvv'=>$cccvv, 'NDBelongToOther'=>$NDBelongToOther, 'NDwhich'=>$NDwhich, 'ND_hold_office'=>$ND_hold_office, 'NDBackgroundSkill_y_n'=>$NDBackgroundSkill_y_n, 'NDBackgroundSkill'=>$NDBackgroundSkill, 'ND_Interested'=>$ND_Interested, 'ND_Prime_Pub_Polcy'=>$ND_Prime_Pub_Polcy, 'NDEducation'=>$NDEducation, 'ND_Any_Rel'=>$ND_Any_Rel, 'ND_any_rel_who'=>$ND_any_rel_who, 'NDLeaseProp'=>$NDLeaseProp, 'NDLeasePropAcres'=>$NDLeasePropAcres, 'NDPropEvent'=>$NDPropEvent, 'NDOwnPropWildlife'=>$NDOwnPropWildlife, 'NDAcres'=>$NDAcres, 'NDWildlife_game'=>$NDWildlife_game, 'NDOwnedProp'=>$NDOwnedProp, 'NDAcres_livestock'=>$NDAcres_livestock, 'NDLivestockType'=>$NDLivestockType, 'NDOwnPropFence'=>$NDOwnPropFence, 'NDLeasedPropFence'=>$NDLeasedPropFence,); foreach($newmember_fields as $key=>$value) { $newmember_add->setField($key,$value); } $newmember_result = $newmember_add->execute(); if(FileMaker::isError($newmember_result)) fmsTrapError($newmember_result,"error.php"); $newmember_row = current($newmember_result->getRecords()); one or two of those fields are declared in other places, if theyre not on the list. If I drop it down to everything up to Phone3, it works fine. Only a handful of fields work when added after Phone3, though. I'm stumped. I checked my php.ini file and there's no post limit or anything like that causing problems. Edited February 24, 2009 by Guest
Baloo Posted March 2, 2009 Posted March 2, 2009 What error are you getting? Are all of the fields in the insert present in the layout? Are you attempting to add text to a number field? Do any of the fields require validation?
Recommended Posts
This topic is 6002 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now