How do I do this??

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

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,


Re: How do I do this??

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

status: /
Quoted text here. Click to load it

Re: How do I do this??

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,


bebbet wrote:
Quoted text here. Click to load it

Re: How do I do this?? says...
Quoted text here. Click to load it


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

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

Re: How do I do this??

*** wrote/escribió (19 May 2005 08:17:16 -0700):
Quoted text here. Click to load it

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


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

-- Álvaro G. Vicario - Burgos, Spain
-- - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group

Site Timeline