Thread: Web pages tables over intranet
Hello! Well, my english is not very good, so sorry. There are some text-based DB wich are made with the data entered in a form in a web page. Now, I wish to move this text files to a a DB, but I don't know how I will do this. Can somebody help me? Thanks Fernando Maresca
On Wed, 11 Oct 2000 17:53 Fernando M. Maresca wrote: >There are some text-based DB wich are made with the data entered in a >form in a web page. Now, I wish to move this text files to a a DB, but I >don't know how I will do this. If the fields are delimited (by tabs or commas, or some other single character) then you can do it from within psql using the SQL copy command. man l copy -- Anthony E. Greene <agreene@pobox.com> <http://www.pobox.com/~agreene/> PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D Chat: AOL/Yahoo: TonyG05 ICQ: 91183266 Linux. The choice of a GNU Generation. <http://www.linux.org/>
On Thu, 12 Oct 2000, Fernando M. Maresca wrote: > Hello! > Well, my english is not very good, so sorry. Perhaps you could get someone to help you with it, or maybe use Babelfish.altavista.com. Babelfish isn't very good, but it is better than nothing. > There are some text-based DB wich are made with the data entered in a > form in a web page. Now, I wish to move this text files to a a DB, but I > don't know how I will do this. > Can somebody help me? I'm not sure what you are asking for. There are some text based interfaces to databases. Some come with the database programs, oterhs are written in languages like PHP. If you have a comma delimited text file, you can probably import that directly. Am I close at all? Gord Matter Realisations http://www.materialisations.com/ Gordon Haverland, B.Sc. M.Eng. President 101 9504 182 St. NW Edmonton, AB, CA T5T 3A7 780/481-8019 ghaverla @ freenet.edmonton.ab.ca 780/993-1274 (cell)
Thanks for your help. Ok, my problem is how send to the DB server the data entered trough the browser when the user fills the forms, and how can I retrieve the data from the server when is needed to display it in the web page over the intranet. There are no problems to import the text mode data bases. May be you can tell me how I can rewrite the web pages, because now those appends lines to a text file, and I'm trying to append records to a data base in the server. thank you. Fernando On Thu, 12 Oct 2000 ghaverla@freenet.edmonton.ab.ca wrote: > > On Thu, 12 Oct 2000, Fernando M. Maresca wrote: > > > Hello! > > Well, my english is not very good, so sorry. > > Perhaps you could get someone to help you with it, or > maybe use Babelfish.altavista.com. Babelfish isn't very > good, but it is better than nothing. > > > There are some text-based DB wich are made with the data entered in a > > form in a web page. Now, I wish to move this text files to a a DB, but I > > don't know how I will do this. > > Can somebody help me? > > I'm not sure what you are asking for. There are some text > based interfaces to databases. Some come with the database > programs, oterhs are written in languages like PHP. If > you have a comma delimited text file, you can probably > import that directly. > > Am I close at all? > > Gord > > Matter Realisations http://www.materialisations.com/ > Gordon Haverland, B.Sc. M.Eng. President > 101 9504 182 St. NW Edmonton, AB, CA T5T 3A7 > 780/481-8019 ghaverla @ freenet.edmonton.ab.ca > 780/993-1274 (cell) > > >
On Thu, 12 Oct 2000, Fernando M. Maresca wrote: > > Thanks for your help. > Ok, my problem is how send to the DB server the data entered trough the > browser when the user fills the forms, and how can I retrieve the data > from the server when is needed to display it in the web page over the > intranet. > There are no problems to import the text mode data bases. > May be you can tell me how I can rewrite the web pages, because now those appends lines > to a text file, and I'm trying to append records to a data base in the > server. [ I need to watch for me making spelling mistakes :-) ] It sounds like you know how to write HTML forms, you now want to get this information into a database. There are LOTS of ways to do this, I have no idea which is going to work out best for you. I am going to suggest that you use PHP. PHP knows how to talk to many databases, including PostgreSQL. Most of the examples you will find are for PHP talking to MySQL, but it is not too hard to convert these manually to PostgreSQL, and there is one program registered at freshmeat.net which can do this automatically. Basically, instead of ... action="page.html" or action="page.cgi", you end up writing action="page.php". Then you write a file, (page.php) which has a beginning and end (preamble and epilogue) that are html and a center part which is PHP. The PHP language has commands for connecting to databases, SELECTing records, INSERTing data, and all the other things you might do with SQL. I can't say I know exactly what to write, I am still learning this myself. There are books out there on PHP. One place to look on the Internet is http://www.php.net/ Hopefully others will be able to help, but if not, I can type in a couple of examples from the book I am reading. Other ways to do this, embed perl in HTML, embed HTML in perl, Mason, ASP, .... Too much variety. But PHP at least has lots of followers. Gord Matter Realisations http://www.materialisations.com/ Gordon Haverland, B.Sc. M.Eng. President 101 9504 182 St. NW Edmonton, AB, CA T5T 3A7 780/481-8019 ghaverla @ freenet.edmonton.ab.ca 780/993-1274 (cell)
On Thu, 12 Oct 2000 14:09 Fernando M. Maresca wrote: >Ok, my problem is how send to the DB server the data entered trough the >browser when the user fills the forms, and how can I retrieve the data >from the server when is needed to display it in the web page over the >intranet. You can use perl with DBD/DBI modules for PostgrSQL or you can use PHP. Either one can take data entered on a Web form and insert it into a database. They can also get data from a database and display it in a web page. I use perl with the Pg module for PostgreSQL. DBD/DBI would probably be better, but I got started using Pg.pm and I don't want to change unless it becomes necessary. If you want to use perl, you should download the DBD module for PostgreSQL from cpan.perl.org. My Red Hat 6.2 box came with PHP already installed and working, including the modules for PostgreSQL. If you want to use PHP, take a look at /home/httpd/html/manual/mod/mod_php3/manual.html. -- Anthony E. Greene <agreene@pobox.com> <http://www.pobox.com/~agreene/> PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26 C484 A42A 60DD 6C94 239D Chat: AOL/Yahoo: TonyG05 ICQ: 91183266 Linux. The choice of a GNU Generation. <http://www.linux.org/>