I have a form that I need to submit to the database. It's mostly checkmarks to submit to the database but it only submits all feilds and not just the ones checked off, filled out. Below is the form and my PHP code. I really appreciate any help in advance. I'm really new at this and trying to learn. and I don't know which type, varchar, char ect to use. I get the form to submit but it shows all feilds in the database not just the ones checked off/filled out. Actuall it doesn't show any of the text from the text feilds at all. I'd really appreciate any help in advance. I'm very new at this and trying to learn is trying to understand a whole new language in a very short time. I'm doing this work for a non-profit if I can figure it out. Below is the form and my PHP code I don't know how to post them so it's in high lighted text..
FORM:
Expand|Select|Wrap|Line Numbers
- Southern Adirondack Independent Living
- -Service Record-
- Name:
- Date:
- Male:
- Female:
- Phone:
- County:
- Person with Impairment:
- Family Member/Significant Other:
- Other/Specify:
- Business Agency:
- Advocacy/Legal Services: Assistance and or/representation in.
- Assistive Devices/Equipment Services: Provision of and training in use of, specialized devices and equipment such as TTY's, computers, or other information technology hardware or software, or the provision of assistance to obtain these devices and equipment from other sources.
- Benefits Advisement: Assistance provided to obtain economic.
- Architectural Barrier Services: Advice, information or assistance regarding removal of architectural barriers from any publicly or privately owned residence or other building or constructed facility, whether already built or in the planning stages, including preparation of detailed plans.
- Business/Industry/Agency Services: Services provided to businesses and agencies not specified elsewhere. E.G.: assistance provided to four individuals with impairments who work at ABC business to resolve dispute concerning a discriminatory practice. The number of employees with impairments should be counted here.
- Children's Services: The provision of specific IL services designed to serve individuals with significant impairments under the age of 5.
- Communication Services: Services directed to enable consumers to better communicate, such as interpreter services, training in communications equipment use, Braille instruction and reading services.
- Family Services: Services provided to family members of an individual with a significant impairment when necessary for improving the individual's ability to live and function more independently, or ability to engage in or continue in employment. Such services may include respite care. The service should be recorded in the CSR on behalf of whom services were provided.
- Housing, Home Modifications, and Other Shelter Services: Services directly related to securing housing or shelter, and/or modifying the house or shelter for a person with a significant impairment. services include assistance with reviewing and evaluating newspaper ads and training concerning communicating with landlords.
- Voter Registration: Assistance provided to register individuals to vote.
- Contact Summary:
- Staff Person/Date:
- Follow up:
- Staff Person/Date:
$textbox1name = $_POST['textbox1name'];
$textbox2date = $_POST['textbox2date'];
$check1male = $_POST['check1male'];
$check2female = $_POST['check2female'];
$text3phone = $_POST['text3phone'];
$textbox4county = $_POST['textbox4county'];
$check3personwithimpairment = $_POST['check3personwithimpairment'];
$check4family_member_significant_other = $_POST['check4family_member_significant_other'];
$textbox5other_specify = $_POST['textbox5other_specify'];
$textbox6business_agency = $_POST['textbox6business_agency'];
$chech5advocacy_legal_services = $_POST['chech5advocacy_legal_services'];
$check9_architectual_barrier_services = $_POST['check9_architectual_barrier_services'];
$check7_assistive_devices_equipment_services = $_POST['check7_assistive_devices_equipment_services'];
$check8_benefits_advisment = $_POST['check8_benefits_advisment'];
$check10_business_industry_agency_services = $_POST['check10_business_industry_agency_services'];
$check11_childrens_services = $_POST['check11_childrens_services'];
$check12_communication_services = $_POST['check12_communication_services'];
$check13_family_services = $_POST['check13_family_services'];
$check14_housing_home_modification_other_shelter_s ervices = $_POST['check14_housing_home_modification_other_shelter_s ervices'];
$chech15_il_skills_traing_life_skills_training = $_POST['chech15_il_skills_traing_life_skills_training'];
$check16_inforamtion_referral = $_POST['check16_inforamtion_referral'];
$check17_mobility_training = $_POST['check17_mobility_training'];
$check18_peer_counseling_services= $_POST['check18_peer_counseling_services'];
$check19_preventative_services = $_POST['check19_preventative_services'];
$check20_prostheses_orthics_other_appliances = $_POST['check20_prostheses_orthics_other_appliances'];
$check21_recreational_services = $_POST['check21_recreational_services'];
$check22_rehabilitation_technology_services = $_POST['check22_rehabilitation_technology_services'];
$check24_transportation_services = $_POST['check24_transportation_services'];
$check25_youth_services = $_POST['check25_youth_services'];
$check26_vocational_services = $_POST['check26_vocational_services'];
$check27_voter_reistration = $_POST['check27_voter_reistration'];
$textbox7_staff_person_date1 = $_POST['textbox7_staff_person_date1'];
$textbox8_staff_person_date2 = $_POST['textbox8_staff_person_date2'];
mysql_connect("localhost.ueuo.com", "67466", "febjan12") or die(mysql_error());
mysql_select_db("67466") or die(mysql_error());
mysql_query("INSERT INTO `servicerecord` (textbox1name, textbox2date, check1male, check2female, text3phone, textbox4county, check3personwithimpairment, check4family_member_significant_other, textbox5other_specify, textbox6business_agency, chech5advocacy_legal_services, check9_architectual_barrier_services, check7_assistive_devices_equipment_services, check8_benefits_advisment, check10_business_industry_agency_services, check11_childrens_services, check12_communication_services, check13_family_services, check14_housing_home_modification_other_shelter_se rvices, chech15_il_skills_traing_life_skills_training, check16_inforamtion_referral, check17_mobility_training, check18_peer_counseling_services, check19_preventative_services, check20_prostheses_orthics_other_appliances, check21_recreational_services, check22_rehabilitation_technology_services, check24_transportation_services, check25_youth_services, check26_vocational_services, check27_voter_reistration, textbox7_staff_person_date1, textbox8_staff_person_date2) VALUES ('$textbox1name', '$textbox2date', '$check1male', '$check2female', '$text3phone', '$textbox4county', '$check3personwithimpairment', '$check4family_member_significant_other', '$textbox5other_specify', '$textbox6business_agency', '$chech5advocacy_legal_services', '$check9_architectual_barrier_services', '$check7_assistive_devices_equipment_services', '$check8_benefits_advisment', '$check10_business_industry_agency_services', '$check11_childrens_services', '$check12_communication_services', '$check13_family_services', '$check14_housing_home_modification_other_shelter_ services', '$chech15_il_skills_traing_life_skills_training', '$check16_inforamtion_referral', '$check17_mobility_training', '$check18_peer_counseling_services', '$check19_preventative_services', '$check20_prostheses_orthics_other_appliances', '$check21_recreational_services', '$check22_rehabilitation_technology_services', '$check24_transportation_services', '$check25_youth_services', '$check26_vocational_services', '$check27_voter_reistration', '$textbox7_staff_person_date1', '$textbox8_staff_person_date2')");
if (mysql_affected_rows == 1) {
echo "Succeeded";
}else{
echo "Failed: ".mysql_affected_rows()." affected rows with Query: ".$query."<br />Error:".mysql_error();
}
?>
[/PHP]