42 users online (0 members and 42 guests)  


  Results 1 to 2 of 2

Related

  1. Replies: 0
  2. Replies: 1
  3. Dynamic form fields    Forum: Website Scripts Forum
    Replies: 1
  4. php contact form    Forum: PHP Forum
    Replies: 13
  1. #1
    bufhal's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Apr 2006
    Posts
    32

    display fields from contact form

    Hi;
    hope someone can help me.
    I have a conact form with the following post command:
    <form action="thankyou.php" method="post" name="contactform" id="contactform">
    <input type="hidden" name="recipient" value="contactform" />
    <input type="hidden" name="subject" value="Response from Web Form" />

    Below is the thankyou.php page.

    My question is: How can I have the contact form typed input from the user display on my PHP page (i.e. the contact form uses <input type="text" name="Username" size="45" /></td>). How can the PHP display the results?
    Thank you very much in advance..I appreciate any help.

    <?php
    session_cache_limiter('nocache');
    session_start();
    include "subs.php";
    Print_header ("Get Password","",0);
    ?>
    <br><center><h1>Thank You!</h1></center><br>
    <TABLE border="0" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0">
    <TR>
    <TD width=600><BR>
    <BR>
    </TD></TR></TABLE>
    <?
    Print_footer ();
    ?>

  2. #2
    DeadMeatGF's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    381

    Re: display fields from contact form

    First off, before anyone else gets in, please use the [code] or [php] tags to enclose your code.

    Anyway, you should find all of the form variables in $_POST['form_item'] so, for example you could use
    PHP Code:
    <?php
    session_cache_limiter
    ('nocache'); 
    session_start();
    include 
    "subs.php";
    Print_header ("Get Password","",0);
    echo 
    "<br><center><h1>Thank You ".$_POST['Username']."!</h1></center><br>\n";
    ?>
    <TABLE border="0" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0">
    <TR>
    <TD width=600><BR>
    <BR>
    </TD></TR></TABLE>
    <?
    Print_footer 
    ();
    ?>



Tags for this Thread