Discussion:
Transfer data from webpage form to database
(too old to reply)
Pete.....
2004-11-23 17:03:35 UTC
Permalink
Hi all.
I have made a webpage where there is a webform where people can fill in
their personel information:

The code is below:


I want to transfer the data to a postgreSQL database ( I have allready made
the database with the neccesary tables, and I know how to connect to it )
but I really have no idea how I can transfer the data from the webform to
the database.

If any can help me I will be more than pleased... thanks for your help...
BTW the only programming language that I know is Python :D

<html>

<head>

<title> Adminperson </title>

</head>

<body bgcolor="#0479ff">

<h1><p align="center">Insert Person</h1></p>

<hr>

<form action="default.asp" method="post">
<p>Name:<br><input type="text" name="name"></p>
<p>Surname:<br><input type="text" name="surnavn"></p>
<p>Username:<br><input type="text" name="usernavn"></p>
<p>Password:<br><input type="text" name="password"></p>
<p>Adresse:<br><input type="text" name="adresse"></p>
<p>Zipcode:<br><input type="text" name="zipcode"></p>
<p>City:<br><input type="text" name="city"></p>
<p>Phone:<br><input type="text" name="phone"></p
<p>Mail:<br><input type="text" name="mail"></p>


<p> What is your profession? <p>
<INPUT TYPE=CHECKBOX NAME="Profession" VALUE="Student" CHECKED> Student
<INPUT TYPE=CHECKBOX NAME="Profession" VALUE="Teacher" CHECKED> Teacher
<INPUT TYPE=CHECKBOX NAME="Profession" VALUE="Teacher Assistent" CHECKED>
Teacher Assistent
<p><input type="submit" value="Submit"></p>
</body> </html>
boyd
2004-12-16 22:50:22 UTC
Permalink
I will try working up an example - been wanting to do some Python,
anyway. Have done this in perl, so should be able to do it in similar
fashion.

By the way, you might want to correct the spelling on the web page:
"Teacher Assistant" (assuming you live in USA - it may be spelled your
way in other countries :)

In the meantime, a google.com search showed several examples of doing
CGI scripts in Python, and others which import the DB modules, so there
is probably an example on the web that does just what you want.

Boyd
Post by Pete.....
Hi all.
I have made a webpage where there is a webform where people can fill in
I want to transfer the data to a postgreSQL database ( I have allready made
the database with the neccesary tables, and I know how to connect to it )
but I really have no idea how I can transfer the data from the webform to
the database.
If any can help me I will be more than pleased... thanks for your help...
BTW the only programming language that I know is Python :D
<html>
<head>
<title> Adminperson </title>
</head>
<body bgcolor="#0479ff">
<h1><p align="center">Insert Person</h1></p>
<hr>
<form action="default.asp" method="post">
<p>Name:<br><input type="text" name="name"></p>
<p>Surname:<br><input type="text" name="surnavn"></p>
<p>Username:<br><input type="text" name="usernavn"></p>
<p>Password:<br><input type="text" name="password"></p>
<p>Adresse:<br><input type="text" name="adresse"></p>
<p>Zipcode:<br><input type="text" name="zipcode"></p>
<p>City:<br><input type="text" name="city"></p>
<p>Phone:<br><input type="text" name="phone"></p
<p>Mail:<br><input type="text" name="mail"></p>
<p> What is your profession? <p>
<INPUT TYPE=CHECKBOX NAME="Profession" VALUE="Student" CHECKED> Student
<INPUT TYPE=CHECKBOX NAME="Profession" VALUE="Teacher" CHECKED> Teacher
<INPUT TYPE=CHECKBOX NAME="Profession" VALUE="Teacher Assistent" CHECKED>
Teacher Assistent
<p><input type="submit" value="Submit"></p>
</body> </html>
Loading...