Hi All,
Am fairly new to PHP but managed to successfully complete a form and all works well!
However, using similar code on another site the form goes through to a dynamic page and sends email back all correctly and has the titles of the textfields ready to have the values the user inputs next to ...but there are no values from any of the textfields???

Here is the PHP code if anyone can give me a simple answer as to what i am missing....?

<?php
$name = $_POST['Name'];
$company = $_POST['Company'];
$email = $_POST['Email'];
$tel = $_POST['Tel'];
$otherpages = $_POST['Other Pages'];
$otherform = $_POST['Other Forms'];
$addition = $_POST['Additional Info'];
 
 
# Email to Form Owner
 
$emailTo = '"Picture Perfect" <info@pictureperfectireland.com>';
 
$emailSubject = "Web Enquiry";
 
$emailFrom = "$Email";
 
$emailBody = "name: $name\n"
. "company: $company\n"
. "email: $email\n"
. "tel: $tel\n"
. "otherpages: $otherpages\n"
. "otherform: $otherform\n"
. "addition: $addition\n"
. "\n"
. "";
 
$emailHeader = "From: $emailFrom\n"
. "Reply-To: $emailFrom\n"
. "MIME-Version: 1.0\n"
. "Content-type: text/plain; charset=\"ISO-8859-1\"\n"
. "Content-transfer-encoding: quoted-printable\n";
 
mail($emailTo, $emailSubject, $emailBody, $emailHeader);
 
?>

Post the HTML code from your form. And then we might be able to better help you.

Hi Alpha!

Heres all the code from the PHP file:

<HTML>
<HEAD>
<TITLE>Process Order</TITLE>
<meta http-equiv="Content-Style-Type" content="text/css">
<LINK HREF="style.css" TYPE="text/css" REL="stylesheet"> 
<style type="text/css">
<!--
.style2 {font-size: 14px}
.style8 {
    color: #FFFFFF;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
}
.style9 {
    font-size: 9px;
    font-style: italic;
    color: #CCCC66;
}
.style10 {color: #FFFFFF; font-size: 12px; font-family: Arial, Helvetica, sans-serif; font-weight: bold; }
-->
</style>
</HEAD>
<BODY BGCOLOR=#929292 LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 rightmargin="0" bottommargin="0">
<center>
<div style=" width:778px;height:px;border-color:#444444;border-style:solid;border-width:6px">
<TABLE WIDTH=766 BORDER=0 CELLPADDING=0 CELLSPACING=0>
    <tr>
        <td width="127"><a href="index.html"><img src="images/1-left.jpg"></a></td>
        <td width="18"><a href="index.html"><img src="images/menu-1.jpg" width="18" height="729" border="0"></a></td>
        <TD><a href="aboutus.html"><img src="images/menu-2.jpg" alt="" width=18 height=729 border="0"></a></TD>
        <TD><a href="portfolio.html"><img src="images/menu-3.jpg" alt="" width=18 height=729 border="0"></a></TD>
        <TD><a href="web.html"><img src="images/menu-4.jpg" alt="" width=18 height=729 border="0"></a></TD>
        <td width="106"><TABLE WIDTH=106 BORDER=0 CELLPADDING=0 CELLSPACING=0>
                <TR>
                    <TD><a href="index-4.html"><img src="images/plac_01.jpg" width=106 height=218 alt=""></a></TD>
                </TR>
                <TR>
                    <TD><IMG SRC="images/plac_02.jpg" WIDTH=106 HEIGHT=147 ALT=""></TD>
                </TR>
                <TR>
                    <TD><IMG SRC="images/plac_03.jpg" WIDTH=106 HEIGHT=146 ALT=""></TD>
                </TR>
                <TR>
                    <TD><IMG SRC="images/plac_05.jpg" WIDTH=106 HEIGHT=218 ALT=""></TD>
                </TR>
            </TABLE></td>
 
        <td width="378" height="100%">
            <table width="378" height="100%" background="images/1-back.jpg" border="0" cellspacing="0" cellpadding="0">
            <tr>
             <td height="56" background="images/1-end.jpg"><div align="center"><img src="images/spacer.gif" width="1" height="56"><strong><span class="style-g style2">Thank
             You! </span></strong></div></td>
            </tr>
            <tr><td><img src="images/line-1.jpg" style="margin-left:28px"></td></tr>
 
            <tr>
                <td height="158">
                    <div style=" padding-left:26px;padding-top:15px;padding-right:15px">                        
                     <p align="center">
 
<?php
$name = $_POST['Name'];
$company = $_POST['Company'];
$email = $_POST['Email'];
$tel = $_POST['Tel'];
$otherpages = $_POST['Other Pages'];
$otherform = $_POST['Other Forms'];
$addition = $_POST['Additional Info'];
 
 
# Email to Form Owner
 
$emailTo = '"Picture Perfect" <info@pictureperfectireland.com>';
 
$emailSubject = "Web Enquiry";
 
$emailFrom = "$Email";
 
$emailBody = "name: $name\n"
. "company: $company\n"
. "email: $email\n"
. "tel: $tel\n"
. "otherpages: $otherpages\n"
. "otherform: $otherform\n"
. "addition: $addition\n"
. "\n"
. "";
 
$emailHeader = "From: $emailFrom\n"
. "Reply-To: $emailFrom\n"
. "MIME-Version: 1.0\n"
. "Content-type: text/plain; charset=\"ISO-8859-1\"\n"
. "Content-transfer-encoding: quoted-printable\n";
 
mail($emailTo, $emailSubject, $emailBody, $emailHeader);
 
?>
 
 
                     <br>
             <span class="style8">Your quote request will be processed and returned
             via email, if you have any further queries please feel
             free to <br>contact us again. </span></p>
                     <p align="center" class="style10"><a href="aboutus.html">Return to Contact Page </a></p>
                     <div style=" padding-top:6px"> <div style=" padding-left:15px;padding-top:1px;line-height:16px"></div>
                     </div>
                 </div>
                </td>
            </tr>
            <tr><td><img src="images/line-1.jpg" style="margin-left:28px"></td></tr>
 
            <tr>
                <td height="163"><div style=" padding-left:26px;padding-top:15px"></div>
             </td>
            </tr>
            <tr><td><img src="images/line-1.jpg" style="margin-left:28px"></td></tr>            
            <tr>
                <td height="51" align="center" style="padding-top:23px">Copyright 2005-2006 &copy; Picture
                 Perfect </td>
            </tr>
            <tr><td height="100%" background="images/1-end.jpg"><img src="images/spacer.gif" width="1" height="1"></td></tr>
            </table>
        </td>
 
        <TD><a href="photo.html"><img src="images/menu-5.jpg" alt="" width=18 height=729 border="0"></a></TD>
        <TD><IMG SRC="images/1-right.jpg" WIDTH=60 HEIGHT=729 ALT=""></TD>
    </tr>
</TABLE>
</div>
</center>
</BODY>
</HTML>

I don't know why I am doing this...

I m also new to PHP.

make sure that there is not any kind of redirection involved.
coz post data doesn't go with the form during redirection.

also make sure that the server where the new site is hosted supports $_POST .

maybe this could help.

and where r ur input tags...?

u can mail me at purecollection@hotmail.com for any query.

What are you using for the form? I don't see any <form> tags.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.