Gazing into my crystal ball I observed "SAH"
<webit@[NOSPAM]accesswave.ca> writing in
OK, I see what you are saying. How does one go about setting this all
up ? I have been doing some reading today and it seems like I would
have to learn to program in MySQL to do this. Please correct me if I'm
wrong.
To again state what it is I want to do;
I want to be able to have people enter application data into a form
online, and have it compiled into a database without having to retyping
each application. Keeping in mind that I need to keep it simple as some
of the people will be less than internet savvy to say the least.
Thanks for the info so far, much appreciated.
I can show you in ASP, adjust accordingly for PHP. Say you want to collect
names, email addresses, and cities.
Page used to collect information:
<form id="collectinfo" method="post" action="collect_post.asp">
<fieldset>
<label for="namea">Your Name: </label> <input type="text" name="namea"
id="namea" value="<%=namea%>" />
<label for="email">Email: <label> <input type="text" name="email"
id="email" value="<%=email%>" />
<label for="city">City: </label> <input type="text" name="city" id="city"
value="<%=city%>" />
<input type="submit" value="Submit" />
</fieldset>
</form>
<!-- the values of <%=value%> are for filling in the fields if they come
back from making a mistake -->
Page used to process:
<%
dim namea
dim email
dim city
dim insert
'you can do some checking for required fields here and send them back to
'the original page if something is missing
namea = request.form("namea")
email = request.form("email")
city = request.form("city")
'this insert statement is standard SQL
insert = "INSERT INTO tablename "
insert = insert & " (namea, email, city)"
insert = insert & " VALUES ('" & namea & "', "
insert = insert & "'" & email & "', "
insert = insert & "'" & city & "')"
myconn.Execute insert
'myconn is however you connect to your database
response.redirect "thankyou.asp"
%>
This is in ASP classic, and I'm sure PHP isn't that different. Hmm... I'm
supposed to be teaching myself PHP...