Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Apr 2004
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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" />

    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?


    Below is the thankyou.php page.



    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
    Regular Coder
    Join Date
    May 2006
    Posts
    101
    Thanks
    0
    Thanked 1 Time in 1 Post
    use echo or print to display values in php, see below code.

    Code:
    <? echo $_GET['Username']; ?>

  • #3
    New Coder
    Join Date
    Apr 2004
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanks for the reply

    Thank you.
    will that display the data entered into the form on the previous page after the form is submitted?

    I appreciate your time

  • #4
    Regular Coder
    Join Date
    May 2006
    Posts
    101
    Thanks
    0
    Thanked 1 Time in 1 Post
    yes, it will.

  • #5
    New Coder
    Join Date
    Apr 2004
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanks Harsh

    Thank you. One last question, please.
    In am trying to find the new line char in PHP so the info will break to the next line. I tries /r
    but got parse error.
    Thanks for your help

  • #6
    Regular Coder
    Join Date
    May 2006
    Posts
    101
    Thanks
    0
    Thanked 1 Time in 1 Post
    Code:
    echo "\r";

  • #7
    New Coder
    Join Date
    Apr 2004
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    like this?

    sorry to bother you again but is this what you mean?

    <?
    echo $_POST['Realname']echo "\r";

    echo $_POST['Username']echo "\r";

    echo $_POST['Title']echo "\r";

    echo $_POST['Company']echo "\r";

  • #8
    Regular Coder
    Join Date
    Oct 2004
    Location
    London E4 UK
    Posts
    320
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm awful at this but only one echo at the start of the line

    PHP Code:
    echo $_POST['Realname']."\r"
    something like that anyway
    Last edited by Tynan; 06-08-2006 at 07:52 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •