gnubie questions regarding working with form contents...
Joshua S. Freeman
jfreeman at amnh.org
Thu May 1 22:21:31 EDT 2003
I have a page with PHP doing the following things so far:
1) if NOT submitting, then display a form.
2) if submitting, echo the contents of the submission and insert into the
values into a database.
The insert statement is working just fine.
I'm having some problems with the echoing of the contents to the page.
Here is the echo statement I'm using to echo the inserted values:
----------snip------------
while (list($name, $value) = each($HTTP_POST_VARS)) {
echo "$name = $value<br>.\
";
----------snip------------
problem number one is: I forgot how to do that using 'foreach' instead of
while() each()...
problem number two is: because of contents of $HTTP_POST_VARS, "submit =
submit " is coming up as a result of the
echo "$name = $value<br>.\
"
statement.
In other words, in addition to showing the submitter the values of his/her
submission, s/he's also seeing that 'submit=submit' is a value too...
The next problem is that I need to take the submitted name/value pairs and
format and send an email with them to one email address... I have no idea
how do that though I know it involves $HTTP_POST_VARS again...
I want to do this all on one page.
Any help/pointers appreciated!
Thanks!
Joshua
More information about the talk
mailing list