Connect a web form to access database
-
Hello all, I have a simple web form that use an email address to send information once it's submitted. I need to modify it to where it sends the info to an access database. How can I make that happen? javascript file:
//collects the data
function submitForm() {
document.getElementById('apply').submit();
clearForm();
}
//clears the form
function clearForm(){var i; for (i = 0; (i < document.forms.length); i++) { document.forms\[i\].reset();
}
}//create the drop down list
function addOption(selectbox,text,value ){
var optn = document.createElement("option");
optn.text = text;
optn.value = value;
selectbox.options.add(optn);
}function addOption_list(){
var quan = new Array("1","2","3","4","5+");
for (var i=0; i < quan .length;++i){addOption(document.apply.quantity, quan\[i\], quan\[i\]); }
}
function addOption_list2(){
var quan = new Array("1","2","3","4","5","6","7","8","9","10+" );
for (var i=0; i < quan.length;++i){addOption(document.apply.quantitys, quan\[i\], quan\[i\]); }
}
//switches between divs when one of the radio button is checked
function toggle(obj) {
var busDiv = document.getElementById('busi');
var indDiv = document.getElementById('ind');if (obj.value == 'business'){ busDiv.style.display = ''; indDiv.style.display = 'none'; } else{ busDiv.style.display = 'none'; indDiv.style.display = ''; }
}
web form:
<?xml version="1.0" encoding="UTF-8" ?>
<!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" xml:lang="en" lang="en">
<head>
<title>Untitled</title>
<link href="wireless.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="form.js"></script>
</head><body onload="addOption_list(); addOption_list2(); divSelection()" >
<div id="outer">
<img src="" alt="logo" usemap="#logomap" class="carrierLogo" />
<map id="logomap" name="logomap">
<area shape="rect" coords="0,0,399,120" href="#" alt="home"/>
</map><div id="inner">
<form id="apply" name="apply" action="mailto:info@donate.com" method="post" enctype="text/plain"><fieldset>
-
Hello all, I have a simple web form that use an email address to send information once it's submitted. I need to modify it to where it sends the info to an access database. How can I make that happen? javascript file:
//collects the data
function submitForm() {
document.getElementById('apply').submit();
clearForm();
}
//clears the form
function clearForm(){var i; for (i = 0; (i < document.forms.length); i++) { document.forms\[i\].reset();
}
}//create the drop down list
function addOption(selectbox,text,value ){
var optn = document.createElement("option");
optn.text = text;
optn.value = value;
selectbox.options.add(optn);
}function addOption_list(){
var quan = new Array("1","2","3","4","5+");
for (var i=0; i < quan .length;++i){addOption(document.apply.quantity, quan\[i\], quan\[i\]); }
}
function addOption_list2(){
var quan = new Array("1","2","3","4","5","6","7","8","9","10+" );
for (var i=0; i < quan.length;++i){addOption(document.apply.quantitys, quan\[i\], quan\[i\]); }
}
//switches between divs when one of the radio button is checked
function toggle(obj) {
var busDiv = document.getElementById('busi');
var indDiv = document.getElementById('ind');if (obj.value == 'business'){ busDiv.style.display = ''; indDiv.style.display = 'none'; } else{ busDiv.style.display = 'none'; indDiv.style.display = ''; }
}
web form:
<?xml version="1.0" encoding="UTF-8" ?>
<!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" xml:lang="en" lang="en">
<head>
<title>Untitled</title>
<link href="wireless.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="form.js"></script>
</head><body onload="addOption_list(); addOption_list2(); divSelection()" >
<div id="outer">
<img src="" alt="logo" usemap="#logomap" class="carrierLogo" />
<map id="logomap" name="logomap">
<area shape="rect" coords="0,0,399,120" href="#" alt="home"/>
</map><div id="inner">
<form id="apply" name="apply" action="mailto:info@donate.com" method="post" enctype="text/plain"><fieldset>
Microsoft Access database is very Heavy and not recommended. PHP + MySQL is recommended. You can easy learn yourself: DB Connect[^] Insert Data[^] MySQL Select[^]
-
Microsoft Access database is very Heavy and not recommended. PHP + MySQL is recommended. You can easy learn yourself: DB Connect[^] Insert Data[^] MySQL Select[^]
Yeah that's what I ended up doing :) Thanx for the reply though!