By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,776 Members | 1,506 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,776 IT Pros & Developers. It's quick & easy.

How do I do this??

P: n/a
I have setup a database to enter repairtags for our service department.
Everything works fine, but I would like to be able to display the
contents of the form that was submitted after I click the Submit
button. Now it goes to a page that says "Thankyou for your Submission".
Instead of that being displayed, I would like to display all of the
fields that were just entered, as well as a hidden field that creates a
ticket number.

Thanks you your help,

Greg

Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
<input type="text" name="fieldname" value="<?=$_POST['fieldname']?>">

--
bebbet.kicks-ass.net
up/up
1024
status: http://bebbet.kicks-ass.net/aa1/
<we*******@themusiccenterinc.com> schreef in bericht
news:11**********************@f14g2000cwb.googlegr oups.com...
I have setup a database to enter repairtags for our service department.
Everything works fine, but I would like to be able to display the
contents of the form that was submitted after I click the Submit
button. Now it goes to a page that says "Thankyou for your Submission".
Instead of that being displayed, I would like to display all of the
fields that were just entered, as well as a hidden field that creates a
ticket number.

Thanks you your help,

Greg

Jul 17 '05 #2

P: n/a
*** we*******@themusiccenterinc.com wrote/escribió (19 May 2005 08:17:16 -0700):
Instead of that being displayed, I would like to display all of the
fields that were just entered, as well as a hidden field that creates a
ticket number.


echo '<ul>';
echo '<li>Foo: ' . htmspecialchars($_POST['foo']) . '</li>';
echo '<li>Bar: ' . htmspecialchars($_POST['bar']) . '</li>';
echo '</ul>';

Or

echo '<ul>';
foreach($_POST as $name => $value){
echo '<li>' . htmlspecialchars($name) . ': ' . htmlspecialchars($value) . '</li>';
}
echo '</ul>';

--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
Jul 17 '05 #3

P: n/a
Thanks, that did the trick! Except for the hidden field that is
assigned a number by the database. Nothing is entered for that field so
nothing is displayed. Is there a way to pull that from the database and
display it on the page?

Thanks again,

Greg
bebbet wrote:
<input type="text" name="fieldname" value="<?=$_POST['fieldname']?>">


Jul 17 '05 #4

P: n/a
we*******@themusiccenterinc.com says...
Thanks, that did the trick! Except for the hidden field that is
assigned a number by the database. Nothing is entered for that field so
nothing is displayed. Is there a way to pull that from the database and
display it on the page?


Greg,

Depends on what your database is and how the column in the table is
populated.

For MySQL and an auto-increment column, look up the LAST_INSERT_ID() and
mysql_insert_id() functions.

For Oracle, use INSERT INTO .... RETURNING

Geoff M
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.