Thread: Test
I can't seem to post to this list that I keep recieving e-mail from. I want to parse a web form through php and put it into a postgresql batabase. Who can help? or point me toward the right direction... thanks. Chadwick Rolfs
For starters, you need to clarify hat you mean by "parsing a web form". Do you mean getting the information that has been inputted, or taking the form and parsing the html in it? If it is the former and you want to get the info and put it into a database, you should start out by reading some documentation and/or getting a PHP programming book. This is pretty standard stuff for PHP and if you don't even know where to start, you should do some reading first. Your best friend will be www.php.net. For postgresql connectivity, go there and search on pg_connect. It should bring up the relevant functions. Also make sure you have postgres support compiled into your PHP module. Adam Lang Systems Engineer Rutgers Casualty Insurance Company http://www.rutgersinsurance.com ----- Original Message ----- From: "Chadwick Rolfs" <c2304182@webdevel.urban.csuohio.edu> To: <pgsql-php@postgresql.org> Sent: Wednesday, June 13, 2001 3:11 PM Subject: [PHP] Test > I can't seem to post to this list that I keep recieving e-mail from. I > want to parse a web form through php and put it into a postgresql > batabase. Who can help? or point me toward the right direction... > thanks. > > Chadwick Rolfs > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html
Well, thank you very much. I hope that's not sarcasm I detect in this effort to educate the newbies. I should mention that I am a newbie, I am constantly reading the documentation, and that I KNOW WHERE TO START. Here. I got to this list from postgresql.org, and the php lists are tough to navigate (ie, i recieve, but can't seem to consistently post.) Maybe, since you seem to be "in the know", you can point out one of the pgsql/php functions you have mentioned instead of giving me useless information. That would help... If you look closely, you'll see that there is a problem, there is really no function that takes web form contents (yes the name=value pairs, not the html tags (w3.org can do that!)) and puts these into : insert into <table_name> ($web_form_names) values ($web_form_values); Is there anyoneELSE out there who can HELP me? or give me some sort of constructive advice, instead of making me feel like I'm doing something horribly wrong, like adam here.... Chadwick Rolfs On Wed, 13 Jun 2001, Adam Lang wrote: > For starters, you need to clarify hat you mean by "parsing a web form". Do > you mean getting the information that has been inputted, or taking the form > and parsing the html in it? > > If it is the former and you want to get the info and put it into a database, > you should start out by reading some documentation and/or getting a PHP > programming book. > > This is pretty standard stuff for PHP and if you don't even know where to > start, you should do some reading first. > > Your best friend will be www.php.net. > For postgresql connectivity, go there and search on pg_connect. It should > bring up the relevant functions. > > Also make sure you have postgres support compiled into your PHP module. > > > Adam Lang > Systems Engineer > Rutgers Casualty Insurance Company > http://www.rutgersinsurance.com > ----- Original Message ----- > From: "Chadwick Rolfs" <c2304182@webdevel.urban.csuohio.edu> > To: <pgsql-php@postgresql.org> > Sent: Wednesday, June 13, 2001 3:11 PM > Subject: [PHP] Test > > > > I can't seem to post to this list that I keep recieving e-mail from. I > > want to parse a web form through php and put it into a postgresql > > batabase. Who can help? or point me toward the right direction... > > thanks. > > > > Chadwick Rolfs > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 5: Have you checked our extensive FAQ? > > > > http://www.postgresql.org/users-lounge/docs/faq.html > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html > ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster
Hi, >Well, thank you very much. I hope that's not sarcasm I detect in this >effort to educate the newbies. I should mention that I am a newbie, I am >constantly reading the documentation, and that I KNOW WHERE TO START. >Here. I got to this list from postgresql.org, and the php lists are tough >to navigate (ie, i recieve, but can't seem to consistently post.) I don't think that was his intention at all. There is no "one" place to start, it depends on your goals for using php. If you want to use php for sending emails via contact forms, that's totally different to anything database related, which it totally unrelated to using filesystem functions, so it's a bit hard to give you one starting point. >Maybe, since you seem to be "in the know", you can point out one of the >pgsql/php functions you have mentioned instead of giving me useless >information. That would help... http://www.php.net/manual/en/ref.pgsql.php <-- gives you all the postgresql functions for using it with php. eg, how to connect, how to perform the queries etc. >If you look closely, you'll see that there is a problem, there is really >no function that takes web form contents (yes the name=value pairs, not >the html tags (w3.org can do that!)) and puts these into : > >insert into <table_name> ($web_form_names) values ($web_form_values); Nope, you'll either have to create a function to do it yourself, or write it by hand (probably the latter is better, you never have a consistent number of fields etc on forms so a function would quickly become out of control & thus useless). I've got a small tutorial (shameless plug :P) which might give you some starting points. It's a little outdated, haven't got around to updating it yet (it's just using older versions of the software, everything else should be fine) --> http://designmagick.50megs.com/postgresql-tutorial/ or if that doesn't work, it's mirrored at http://www.newbienetwork.net/sections.php?op=listarticles&secid=5 . If you have any specific questions in mind, then feel free to ask :) HTH ---------------------- Chris Smith http://www.squiz.net/
I agree with Adam that the annotated manuals at www.php.net are the authoritative source for information on how to do what you want to do. Unfortunately, you will have to do some homework to come up to speed on how this process works. There is no function that does everything you want for you in any language that I'm aware of. If you find one let me know! We use the ADODB library (http://php.weblogs.com/ADODB) which provides database abstraction for many databases including PostgreSQL. I recommend it highly. The data from the form is returned to PHP as a variable with the same name as the name in the form. The value of this variable is the result returned by the form. Therefore, your code example of "insert into <table_name> ($web_form_names) values ($web_form_values);" is indeed accurate. I suggest you download an open source package and see how it is doing this process. There are many of them available on either www.greatbridge.org or www.sourceforge.net or www.freshmeat.net or ... Michael J. Upchurch Partner2Partner Communications mike@partner2partner.com 615.286.2199 Chadwick Rolfs writes: > Well, thank you very much. I hope that's not sarcasm I detect in this > effort to educate the newbies. I should mention that I am a newbie, I am > constantly reading the documentation, and that I KNOW WHERE TO START. > Here. I got to this list from postgresql.org, and the php lists are tough > to navigate (ie, i recieve, but can't seem to consistently post.) > > Maybe, since you seem to be "in the know", you can point out one of the > pgsql/php functions you have mentioned instead of giving me useless > information. That would help... > If you look closely, you'll see that there is a problem, there is really > no function that takes web form contents (yes the name=value pairs, not > the html tags (w3.org can do that!)) and puts these into : > > insert into <table_name> ($web_form_names) values ($web_form_values); > > Is there anyoneELSE out there who can HELP me? or give me some sort of > constructive advice, instead of making me feel like I'm doing something > horribly wrong, like adam here.... > > Chadwick Rolfs > > On Wed, 13 Jun 2001, Adam Lang wrote: > >> For starters, you need to clarify hat you mean by "parsing a web form". Do >> you mean getting the information that has been inputted, or taking the form >> and parsing the html in it? >> >> If it is the former and you want to get the info and put it into a database, >> you should start out by reading some documentation and/or getting a PHP >> programming book. >> >> This is pretty standard stuff for PHP and if you don't even know where to >> start, you should do some reading first. >> >> Your best friend will be www.php.net. >> For postgresql connectivity, go there and search on pg_connect. It should >> bring up the relevant functions. >> >> Also make sure you have postgres support compiled into your PHP module. >> >> >> Adam Lang >> Systems Engineer >> Rutgers Casualty Insurance Company >> http://www.rutgersinsurance.com >> ----- Original Message ----- >> From: "Chadwick Rolfs" <c2304182@webdevel.urban.csuohio.edu> >> To: <pgsql-php@postgresql.org> >> Sent: Wednesday, June 13, 2001 3:11 PM >> Subject: [PHP] Test >> >> >> > I can't seem to post to this list that I keep recieving e-mail from. I >> > want to parse a web form through php and put it into a postgresql >> > batabase. Who can help? or point me toward the right direction... >> > thanks. >> > >> > Chadwick Rolfs >> > >> > >> > ---------------------------(end of broadcast)--------------------------- >> > TIP 5: Have you checked our extensive FAQ? >> > >> > http://www.postgresql.org/users-lounge/docs/faq.html >> >> >> ---------------------------(end of broadcast)--------------------------- >> TIP 5: Have you checked our extensive FAQ? >> >> http://www.postgresql.org/users-lounge/docs/faq.html >> > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl
On Wed, Jun 13, 2001 at 05:38:30PM -0400, some SMTP stream spewed forth: > Well, thank you very much. I hope that's not sarcasm I detect in this > effort to educate the newbies. I should mention that I am a newbie, I am > constantly reading the documentation, and that I KNOW WHERE TO START. > Here. I got to this list from postgresql.org, and the php lists are tough > to navigate (ie, i recieve, but can't seem to consistently post.) This very much is sarcasm, but I think you deserve it. *shrug*. You want to do something using PHP. I suppose that means you want Documentation. PHP probably has some documentation up on its website, eh? < www.php.net >. On the first page is a link to (*boggle*) documentation. Function documentation would probably be in the manual. Ah, there we go, "Function Reference". Hm...PostgreSQL Functions...(*boing*). > Maybe, since you seem to be "in the know", you can point out one of the > pgsql/php functions you have mentioned instead of giving me useless > information. That would help... This is a really basic use of PHP<->PostgreSQL...you would best be served by a book (or online tutorial). It is not the duty of this list to tutor. > If you look closely, you'll see that there is a problem, there is really > no function that takes web form contents (yes the name=value pairs, not > the html tags (w3.org can do that!)) and puts these into : Of course not, such a thing would be silly. > insert into <table_name> ($web_form_names) values ($web_form_values); > > Is there anyoneELSE out there who can HELP me? or give me some sort of > constructive advice, instead of making me feel like I'm doing something > horribly wrong, like adam here.... Depending on the settings in php.conf global variables may or may not be set from form input. One of the following should work to get the value of <input name="variable"...>: $variable $GLOBALS['variable'] $HTTP_POST_VARS['variable'] $HTTP_GET_VARS['variable'] You must first establish a connection to the PostgreSQL server: $link=pg_connect('host=<host or do not specify for localhost> user=<user> password=<password> dbname=<database name> port=5432'); Then, insert the values using a standard insert query: pg_exec($link, 'insert into <table> values (\''.$variable.'\')'); which executies the query: insert into <table> values ('$variable'); > Chadwick Rolfs > *snip Adam's message* > > Your best friend will be www.php.net. Always a good idea, eh? ;-) (Chadwick: you can do this by using the php function phpinfo();); Try not to be so pleasant when asking other people to take time to help you. As far as I know, none of us get paid to be here (which shouldn't really matter anyway, you can't expect f****** magic all the time. gh > > Adam Lang > > ----- Original Message ----- > > From: "Chadwick Rolfs" <c2304182@webdevel.urban.csuohio.edu> > > > I can't seem to post to this list that I keep recieving e-mail from. I > > > want to parse a web form through php and put it into a postgresql > > > batabase. Who can help? or point me toward the right direction... > > > thanks. > > > Chadwick Rolfs ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
responses inline... Adam Lang Systems Engineer Rutgers Casualty Insurance Company http://www.rutgersinsurance.com ----- Original Message ----- From: "Chadwick Rolfs" <c2304182@webdevel.urban.csuohio.edu> To: "Adam Lang" <aalang@rutgersinsurance.com> Cc: <pgsql-php@postgresql.org> Sent: Wednesday, June 13, 2001 5:38 PM Subject: Re: [PHP] Test > Well, thank you very much. I hope that's not sarcasm I detect in this > effort to educate the newbies. I should mention that I am a newbie, I am > constantly reading the documentation, and that I KNOW WHERE TO START. > Here. I got to this list from postgresql.org, and the php lists are tough > to navigate (ie, i recieve, but can't seem to consistently post.) It was not sarcasm. It was said exactly as it was emant. As someone else posted, the list is not to tutor. Showing saying "this is what I want to do, someone do it for me" is a waste of most of the listers time. The vast majority of posts involving code are of the form "I have done this <post code> and it still is not working, any ideas?". This shows you actually tried doing work on your own first and have a basic understanding of what is going on. Also, it helps us because we don't have to teach PHP, but instead look to see where code went wrong or an idea went wrong. This is actually pretty much the way it goes on the several programming lists I am on. Nealry all of us have things to do besides these lists and do not have the time to teach how to program from the beginning. > > Maybe, since you seem to be "in the know", you can point out one of the > pgsql/php functions you have mentioned instead of giving me useless > information. That would help... > If you look closely, you'll see that there is a problem, there is really > no function that takes web form contents (yes the name=value pairs, not > the html tags (w3.org can do that!)) and puts these into : I did point you in that direction. I said to go to www.php.net and search on pg_connect and it should bring up all the relevant postgresql functions. I just did it right now and on the left of teh screen ALL the postgresql functions are listed. As far as a function to get the data that was put into forms (input boxes, select fields, etc.) , there is no function to do that. The variables are passed to the next php script. You have to take the values and right your own functions to stick them in the database... using the postgresql functions available. > insert into <table_name> ($web_form_names) values ($web_form_values); That is the correct query. Except you don't pass the form name. You have to get each variable by referencing each field it was put in. ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
responses inline ... Adam Lang Systems Engineer Rutgers Casualty Insurance Company http://www.rutgersinsurance.com ----- Original Message ----- From: "Chadwick Rolfs" <c2304182@webdevel.urban.csuohio.edu> To: "Adam Lang" <aalang@rutgersinsurance.com> Sent: Wednesday, June 13, 2001 6:04 PM Subject: Re: [PHP] Test > I can always go to w3.org and get the html parsed... obviously I want to > put what someone fills out into a database No, it was not obvious. I have encountered many situations where people wanted to take a whole webpage and parse it up. As a matter of fact, that is one of the basic ideas of XML. > how about -- THIS MAILING LIST!!! This mailing list is not here to teach you, but to help you when you encounter problems. > 1) I know where to start and never said I didn't > 2) All I do is read, and post to mailing lists > 3) You should read up on your PHP "standards" -- this is not standard > stuff for the PHP Hypertext Processor Umm, yes it is. 99% of the server side scripts (not just PHP) are to get info from form fields. This is the main reason for server side programming. I'm very serious when I say that if you are having problems with this part, gettign a PHP programming book would be in your best interest. Wrox makes a very good book. Beginning PHP Programming 4. Contrary to popular belief, the Internet is HORRIBLE in regards to teaching how to do something from scratch. The Internet is a great reference... bad teacher. Your learning curve will be helped imemnsely if you get a book where you can sit down and have it actually teach you everything. > > Your best friend will be www.php.net. > > For postgresql connectivity, go there and search on pg_connect. It should > > bring up the relevant functions. > I don't think this is at all helpful. It should be obvious that I have > gone here, have a working postgreSQL/php connection, and just need some > helpful advice. No, again, it was not obvious. It seemed like you had no cluse on what to do. You basuically said the same thing yourself. If you don't know how to get form variables, it is a pretty safe bet you do not know database connectivity. One is a highly more detailed usage than the other. > > > Also make sure you have postgres support compiled into your PHP module. > REALLY????? I would have never guessed. This is part of your problem also. You were very vague on what you needed to know and when somethign was said that you did know, you act insulted that it was mentione that you didn't know. Again, the form field stuff is very basic, so when you don't know that, many people will assume you are uninformed on many other aspects. Plus, you would not believe how many people post to this and the other PHP list I'm on and do NOT have postgres support compiled in.
responses inline... Adam Lang Systems Engineer Rutgers Casualty Insurance Company http://www.rutgersinsurance.com ----- Original Message ----- From: "Chadwick Rolfs" <c2304182@webdevel.urban.csuohio.edu> To: "Adam Lang" <aalang@rutgersinsurance.com> Cc: <pgsql-php@postgresql.org> Sent: Wednesday, June 13, 2001 5:38 PM Subject: Re: [PHP] Test > Well, thank you very much. I hope that's not sarcasm I detect in this > effort to educate the newbies. I should mention that I am a newbie, I am > constantly reading the documentation, and that I KNOW WHERE TO START. > Here. I got to this list from postgresql.org, and the php lists are tough > to navigate (ie, i recieve, but can't seem to consistently post.) It was not sarcasm. It was said exactly as it was emant. As someone else posted, the list is not to tutor. Showing saying "this is what I want to do, someone do it for me" is a waste of most of the listers time. The vast majority of posts involving code are of the form "I have done this <post code> and it still is not working, any ideas?". This shows you actually tried doing work on your own first and have a basic understanding of what is going on. Also, it helps us because we don't have to teach PHP, but instead look to see where code went wrong or an idea went wrong. This is actually pretty much the way it goes on the several programming lists I am on. Nealry all of us have things to do besides these lists and do not have the time to teach how to program from the beginning. > > Maybe, since you seem to be "in the know", you can point out one of the > pgsql/php functions you have mentioned instead of giving me useless > information. That would help... > If you look closely, you'll see that there is a problem, there is really > no function that takes web form contents (yes the name=value pairs, not > the html tags (w3.org can do that!)) and puts these into : I did point you in that direction. I said to go to www.php.net and search on pg_connect and it should bring up all the relevant postgresql functions. I just did it right now and on the left of teh screen ALL the postgresql functions are listed. As far as a function to get the data that was put into forms (input boxes, select fields, etc.) , there is no function to do that. The variables are passed to the next php script. You have to take the values and right your own functions to stick them in the database... using the postgresql functions available. > insert into <table_name> ($web_form_names) values ($web_form_values); That is the correct query. Except you don't pass the form name. You have to get each variable by referencing each field it was put in. ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
Well, thank you very much. I hope that's not sarcasm I detect in this effort to educate the newbies. I should mention that I am a newbie, I am constantly reading the documentation, and that I KNOW WHERE TO START. Here. I got to this list from postgresql.org, and the php lists are tough to navigate (ie, i recieve, but can't seem to consistently post.) Maybe, since you seem to be "in the know", you can point out one of the pgsql/php functions you have mentioned instead of giving me useless information. That would help... If you look closely, you'll see that there is a problem, there is really no function that takes web form contents (yes the name=value pairs, not the html tags (w3.org can do that!)) and puts these into : insert into <table_name> ($web_form_names) values ($web_form_values); Is there anyoneELSE out there who can HELP me? or give me some sort of constructive advice, instead of making me feel like I'm doing something horribly wrong, like adam here.... Chadwick Rolfs On Wed, 13 Jun 2001, Adam Lang wrote: > For starters, you need to clarify hat you mean by "parsing a web form". Do > you mean getting the information that has been inputted, or taking the form > and parsing the html in it? > > If it is the former and you want to get the info and put it into a database, > you should start out by reading some documentation and/or getting a PHP > programming book. > > This is pretty standard stuff for PHP and if you don't even know where to > start, you should do some reading first. > > Your best friend will be www.php.net. > For postgresql connectivity, go there and search on pg_connect. It should > bring up the relevant functions. > > Also make sure you have postgres support compiled into your PHP module. > > > Adam Lang > Systems Engineer > Rutgers Casualty Insurance Company > http://www.rutgersinsurance.com > ----- Original Message ----- > From: "Chadwick Rolfs" <c2304182@webdevel.urban.csuohio.edu> > To: <pgsql-php@postgresql.org> > Sent: Wednesday, June 13, 2001 3:11 PM > Subject: [PHP] Test > > > > I can't seem to post to this list that I keep recieving e-mail from. I > > want to parse a web form through php and put it into a postgresql > > batabase. Who can help? or point me toward the right direction... > > thanks. > > > > Chadwick Rolfs > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 5: Have you checked our extensive FAQ? > > > > http://www.postgresql.org/users-lounge/docs/faq.html > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html > ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster
I agree with Adam that the annotated manuals at www.php.net are the authoritative source for information on how to do what you want to do. Unfortunately, you will have to do some homework to come up to speed on how this process works. There is no function that does everything you want for you in any language that I'm aware of. If you find one let me know! We use the ADODB library (http://php.weblogs.com/ADODB) which provides database abstraction for many databases including PostgreSQL. I recommend it highly. The data from the form is returned to PHP as a variable with the same name as the name in the form. The value of this variable is the result returned by the form. Therefore, your code example of "insert into <table_name> ($web_form_names) values ($web_form_values);" is indeed accurate. I suggest you download an open source package and see how it is doing this process. There are many of them available on either www.greatbridge.org or www.sourceforge.net or www.freshmeat.net or ... Michael J. Upchurch Partner2Partner Communications mike@partner2partner.com 615.286.2199 Chadwick Rolfs writes: > Well, thank you very much. I hope that's not sarcasm I detect in this > effort to educate the newbies. I should mention that I am a newbie, I am > constantly reading the documentation, and that I KNOW WHERE TO START. > Here. I got to this list from postgresql.org, and the php lists are tough > to navigate (ie, i recieve, but can't seem to consistently post.) > > Maybe, since you seem to be "in the know", you can point out one of the > pgsql/php functions you have mentioned instead of giving me useless > information. That would help... > If you look closely, you'll see that there is a problem, there is really > no function that takes web form contents (yes the name=value pairs, not > the html tags (w3.org can do that!)) and puts these into : > > insert into <table_name> ($web_form_names) values ($web_form_values); > > Is there anyoneELSE out there who can HELP me? or give me some sort of > constructive advice, instead of making me feel like I'm doing something > horribly wrong, like adam here.... > > Chadwick Rolfs > > On Wed, 13 Jun 2001, Adam Lang wrote: > >> For starters, you need to clarify hat you mean by "parsing a web form". Do >> you mean getting the information that has been inputted, or taking the form >> and parsing the html in it? >> >> If it is the former and you want to get the info and put it into a database, >> you should start out by reading some documentation and/or getting a PHP >> programming book. >> >> This is pretty standard stuff for PHP and if you don't even know where to >> start, you should do some reading first. >> >> Your best friend will be www.php.net. >> For postgresql connectivity, go there and search on pg_connect. It should >> bring up the relevant functions. >> >> Also make sure you have postgres support compiled into your PHP module. >> >> >> Adam Lang >> Systems Engineer >> Rutgers Casualty Insurance Company >> http://www.rutgersinsurance.com >> ----- Original Message ----- >> From: "Chadwick Rolfs" <c2304182@webdevel.urban.csuohio.edu> >> To: <pgsql-php@postgresql.org> >> Sent: Wednesday, June 13, 2001 3:11 PM >> Subject: [PHP] Test >> >> >> > I can't seem to post to this list that I keep recieving e-mail from. I >> > want to parse a web form through php and put it into a postgresql >> > batabase. Who can help? or point me toward the right direction... >> > thanks. >> > >> > Chadwick Rolfs >> > >> > >> > ---------------------------(end of broadcast)--------------------------- >> > TIP 5: Have you checked our extensive FAQ? >> > >> > http://www.postgresql.org/users-lounge/docs/faq.html >> >> >> ---------------------------(end of broadcast)--------------------------- >> TIP 5: Have you checked our extensive FAQ? >> >> http://www.postgresql.org/users-lounge/docs/faq.html >> > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl
On Wed, Jun 13, 2001 at 05:38:30PM -0400, some SMTP stream spewed forth: > Well, thank you very much. I hope that's not sarcasm I detect in this > effort to educate the newbies. I should mention that I am a newbie, I am > constantly reading the documentation, and that I KNOW WHERE TO START. > Here. I got to this list from postgresql.org, and the php lists are tough > to navigate (ie, i recieve, but can't seem to consistently post.) This very much is sarcasm, but I think you deserve it. *shrug*. You want to do something using PHP. I suppose that means you want Documentation. PHP probably has some documentation up on its website, eh? < www.php.net >. On the first page is a link to (*boggle*) documentation. Function documentation would probably be in the manual. Ah, there we go, "Function Reference". Hm...PostgreSQL Functions...(*boing*). > Maybe, since you seem to be "in the know", you can point out one of the > pgsql/php functions you have mentioned instead of giving me useless > information. That would help... This is a really basic use of PHP<->PostgreSQL...you would best be served by a book (or online tutorial). It is not the duty of this list to tutor. > If you look closely, you'll see that there is a problem, there is really > no function that takes web form contents (yes the name=value pairs, not > the html tags (w3.org can do that!)) and puts these into : Of course not, such a thing would be silly. > insert into <table_name> ($web_form_names) values ($web_form_values); > > Is there anyoneELSE out there who can HELP me? or give me some sort of > constructive advice, instead of making me feel like I'm doing something > horribly wrong, like adam here.... Depending on the settings in php.conf global variables may or may not be set from form input. One of the following should work to get the value of <input name="variable"...>: $variable $GLOBALS['variable'] $HTTP_POST_VARS['variable'] $HTTP_GET_VARS['variable'] You must first establish a connection to the PostgreSQL server: $link=pg_connect('host=<host or do not specify for localhost> user=<user> password=<password> dbname=<database name> port=5432'); Then, insert the values using a standard insert query: pg_exec($link, 'insert into <table> values (\''.$variable.'\')'); which executies the query: insert into <table> values ('$variable'); > Chadwick Rolfs > *snip Adam's message* > > Your best friend will be www.php.net. Always a good idea, eh? ;-) (Chadwick: you can do this by using the php function phpinfo();); Try not to be so pleasant when asking other people to take time to help you. As far as I know, none of us get paid to be here (which shouldn't really matter anyway, you can't expect f****** magic all the time. gh > > Adam Lang > > ----- Original Message ----- > > From: "Chadwick Rolfs" <c2304182@webdevel.urban.csuohio.edu> > > > I can't seem to post to this list that I keep recieving e-mail from. I > > > want to parse a web form through php and put it into a postgresql > > > batabase. Who can help? or point me toward the right direction... > > > thanks. > > > Chadwick Rolfs ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)