merky Posted December 10, 2009 Share Posted December 10, 2009 Hi I am trying to get the script below to email the form data, please can someone tell me whats wrong with the script. I get an email however the form data is not contained within it, just a blank template. Anyway heres the code I have written. <?php extract($_REQUEST); // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= 'From: xxxxxxxxxxxxxxx' . "\r\n"; $headers .= 'X-Mailer: PHP/' . phpversion(); $headers .= 'To:[email protected] '. "\r\n"; // multiple recipients $to = '[email protected]' . ', '; // note the comma $to .= '[email protected]'; $subject = "xxxxxxxxxxxx"; $message = <<<EOF <table align="center" width="95%" border="0" cellpadding="5" cellspacing="5"> <tr style="background:red;font-color:white;font-weight:strong;"> <td colspan="2">Site Information</td> </tr> <tr style="background:#F8F8F8"> <td>Site Source</td> <td>$site_source</td> </tr> <tr style="background:#EFEFEF"> <td>Keyword</td> <td>$keyword</td> </tr> <tr style="background:#F8F8F8"> <td>Site Referrer</td> <td>$site</td> </tr> <tr style="background:#EFEFEF"> <td>IP Address</td> <td>$ip</td> </tr> <tr style="background:red;font-color:white;font-weight:strong;"> <td colspan="2">App Information</td> </tr> <tr style="background:#F8F8F8"> <td>Status</td> <td>$status</td> </tr> <tr style="background:#EFEFEF"> <td>propertyval</td> <td>$propertyval</td> </tr> <tr style="background:#F8F8F8"> <td>Forename</td> <td>$fname</td> </tr> <tr style="background:#EFEFEF"> <td>Surname</td> <td>$sname</td> </tr> <tr style="background:#F8F8F8"> <td>Home Tel</td> <td>$daytime</td> </tr> <tr style="background:#EFEFEF"> <td>evening tel</td> <td>$evening</td> </tr> <tr style="background:#F8F8F8"> <td>add</td> <td>$address</td> </tr> <tr style="background:#EFEFEF"> <td>mortgagebal</td> <td>$mortgagebal</td> </tr> <tr style="background:#EFEFEF"> <td>adcredit</td> <td>$adcredit</td> </tr> <tr style="background:#EFEFEF"> <td>postcode</td> <td>$postcode</td> </tr> <tr style="background:#EFEFEF"> <td>appamt</td> <td>$appamt</td> </tr> <tr style="background:#EFEFEF"> <td>collectively</td> <td>$collectively</td> </tr> <tr style="background:#EFEFEF"> <td>howmany</td> <td>$unsecured_creditors</td> </tr> <tr style="background:#EFEFEF"> <td>mobile</td> <td>$mobile</td> </tr> <tr style="background:#EFEFEF"> <td>email</td> <td>$email</td> </tr> <tr style="background:#EFEFEF"> <td>best</td> <td>$besttime</td> </tr> </table> EOF; mail($to, $subject, $message, $headers); // show thank you page include("http://xxxxxxxxxxxxx.co.uk/xxxxxxxxxxxx/xxxxxxxxx.php"); ?> Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/ Share on other sites More sharing options...
atomicrabbit Posted December 11, 2009 Share Posted December 11, 2009 what shows up in the email? anything? Does the table structure with the heading show up? or nothing at all? Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975127 Share on other sites More sharing options...
merky Posted December 11, 2009 Author Share Posted December 11, 2009 Everything shows up except the data which the user entered in the form. So I get an email with all the headings but where the data completed by the user should be it is blank. So it is not extracting the data entered in the form and populating the template. site_source Blank keyword Blank site Blank ip Blank status Blank propertyval Blank fname Blank sname Blank daytime Blank evening Blank address Blank mortgagebal Blank adcredit Blank postcode Blank appamt Blank unsecured_creditors Blank mobile Blank Hope that helps Mark Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975247 Share on other sites More sharing options...
Deoctor Posted December 11, 2009 Share Posted December 11, 2009 place an echo $message before the mail function Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975256 Share on other sites More sharing options...
teamatomic Posted December 11, 2009 Share Posted December 11, 2009 Do this $name=$_POST['name']; echo "$name"; Does the submitted value get printed? Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975261 Share on other sites More sharing options...
merky Posted December 11, 2009 Author Share Posted December 11, 2009 Hi I have put the code so my code is now <?php extract($_REQUEST); // Send email with result to the user $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'To: [email protected]' . "\r\n"; $headers .= 'From:xxxxxxx' . "\r\n"; $headers .= 'X-Mailer: PHP/' . phpversion(); // Mail it $subject = "test"; $name=$_POST['name']; echo "$name"; $message = <<<EOF <table align="center" width="95%" border="0" cellpadding="5" cellspacing="5"> <tr style="background:red;font-color:white;font-weight:strong;"> <td colspan="2">Site Information</td> </tr> <tr style="background:#F8F8F8"> <td>Site Source</td> <td>$site_source</td> </tr> <tr style="background:#EFEFEF"> <td>Keyword</td> <td>$keyword</td> </tr> <tr style="background:#F8F8F8"> <td>Site Referrer</td> <td>$site</td> </tr> <tr style="background:#EFEFEF"> <td>IP Address</td> <td>$ip</td> </tr> <tr style="background:red;font-color:white;font-weight:strong;"> <td colspan="2">App Information</td> </tr> <tr style="background:#F8F8F8"> <td>Status</td> <td>$status</td> </tr> <tr style="background:#EFEFEF"> <td>propertyval</td> <td>$propertyval</td> </tr> <tr style="background:#F8F8F8"> <td>Forename</td> <td>$fname</td> </tr> <tr style="background:#EFEFEF"> <td>Surname</td> <td>$sname</td> </tr> <tr style="background:#F8F8F8"> <td>Home Tel</td> <td>$daytime</td> </tr> <tr style="background:#EFEFEF"> <td>evening tel</td> <td>$evening</td> </tr> <tr style="background:#F8F8F8"> <td>add</td> <td>$address</td> </tr> <tr style="background:#EFEFEF"> <td>mortgagebal</td> <td>$mortgagebal</td> </tr> <tr style="background:#EFEFEF"> <td>adcredit</td> <td>$adcredit</td> </tr> <tr style="background:#EFEFEF"> <td>postcode</td> <td>$postcode</td> </tr> <tr style="background:#EFEFEF"> <td>appamt</td> <td>$appamt</td> </tr> <tr style="background:#EFEFEF"> <td>collectively</td> <td>$collectively</td> </tr> <tr style="background:#EFEFEF"> <td>howmany</td> <td>$unsecured_creditors</td> </tr> <tr style="background:#EFEFEF"> <td>mobile</td> <td>$mobile</td> </tr> <tr style="background:#EFEFEF"> <td>email</td> <td>$email</td> </tr> <tr style="background:#EFEFEF"> <td>best</td> <td>$besttime</td> </tr> </table> EOF; mail($to, $subject, $message, $headers); // show thank you page include("http://xxxxxxxxxxxxx/xxxxxxx/xxxxxx.php"); ?> The values are still blank when I receive the email. Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975262 Share on other sites More sharing options...
Deoctor Posted December 11, 2009 Share Posted December 11, 2009 one thing i didnt got is where have u given the form for accepting the values and where are u posting the values into the respective variables. USE THE CODE TAGS Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975264 Share on other sites More sharing options...
merky Posted December 11, 2009 Author Share Posted December 11, 2009 the form is on a different page, the code is below: <?php extract($_REQUEST); /* 1) fname 2) sname 3) status 4) add 5) propertyval 6) mortgagebal 7) adcredit postcode 9) appamt 10) collectively 11) daytime 12) evening 13) mobile 14) email 15) besttime */ ?> <form action="http://xxxxxxxxxxx/xxxxx/index.php" method="post" name="online"> <script language="JavaScript" type="text/JavaScript"> </script> <table> <tbody> <tr> <td class="height" colspan="2"> <h2>About You</h2> </td> <td colspan="2" class="height"> <h2>Your Property(if applicable)</h2> </td> <td class="height"> </td> </tr> <tr> <td><label for="firstname">First Name:</label></td> <td> <input name="fname" tabindex="1" type="text"></td> <td><label for="status">Status:</label></td> <td> <select name="status" tabindex="13" size="1"> <option value="0">Please Select</option> <option value="1">Homeowner</option> <option value="2">Tenant</option> <option value="3">Living with Parents</option> <option value="4">Other</option> </select> </td> </tr> <tr> <td><label for="sname">Surname:</label></td> <td> <input name="sname" tabindex="2" type="text"></td> <td><label for="propertyval">Property Value:</label></td> <td> <input name="propertyval" tabindex="14" value="£" type="text"></td> </tr> <tr> <td><label for="add">Address:</label></td> <td> <input name="address" tabindex="3" type="text"></td> <td><label for="mortgage">Mortgage Balance</label></td> <td> <input name="mortgagebal" tabindex="15" value="£" type="text"></td> </tr> <tr> <td> </td> <td> <input name="address2" tabindex="4" type="text"></td> <td> </td> <td> </td> </tr> <tr> <td><label for="town">Town:</label></td> <td> <input name="town" tabindex="5" type="text"></td> <td> <h2><label for="history">Your History</label></h2> </td> </tr> <tr> <td><label for="county">County:</label></td> <td> <input name="county" tabindex="6" type="text"></td> <td><label for="adcredit">Do you have any “adverse credit” i.e CCJs or defaults?</label></td> <td> <select name="adcredit" tabindex="16" size="1"> <option value="0">Yes</option> <option value="1">No</option> <option value="2">Unsure</option> </select> </td> </tr> <tr> <td><label for="postcode">Post Code:</label></td> <td> <input name="postcode" tabindex="7" type="text"></td> <td><label for="appamt">Approx how much unsecured debt do you have?</label></td> <td> <select name="appamt" tabindex="17" size="1"> <option value="0">Please select…</option> <option value="1000">£500-£1000</option> <option value="2000">£1000-£2000</option> <option value="3000">£2000-£3000</option> <option value="4000">£3000-£4000</option> <option value="5000">£4000-£5000</option> <option value="6000">£5000-£6000</option> <option value="7000">£6000-£7000</option> <option value="8000">£7000-£8000</option> <option value="9000">£8000-£9000</option> <option value="10000">£9000-£10,000</option> <option value="12000">£10,000-£12,000</option> <option value="14000">£12,000-£14,000</option> <option value="16000">£14,000-£16,000</option> <option value="18000">£16,000-£18,000</option> <option value="20000">£18,000-£20,000</option> <option value="22000">£20,000-£22,000</option> <option value="24000">£22,000-£24,000</option> <option value="26000">£24,000-£26,000</option> <option value="28000">£26,000-£28,000</option> <option value="30000">£28,000-£30,000</option> <option value="32000">£30,000-£32,000</option> <option value="34000">£32,000-£34,000</option> <option value="36000">£34,000-£36,000</option> <option value="38000">£36,000-£38,000</option> <option value="40000">£38,000-£40,000</option> <option value="42000">£40,000-£42,000</option> <option value="44000">£42,000-£44,000</option> <option value="46000">£44,000-£46,000</option> <option value="48000">£46,000-£48,000</option> <option value="50000">£48,000-£50,000</option> <option value="55000">£50,000-£55,000</option> <option value="60000">£55,000-£60,000</option> <option value="70000">£60,000-£70,000</option> <option value="80000">£70,000-£80,000</option> <option value="90000">£80,000-£90,000</option> <option value="100000">£90,000-£100,000</option> <option value="110000">£100,000-£110,000</option> <option value="120000">£110,000-£120,000</option> <option value="140000">£120,000-£140,000</option> <option value="160000">£140,000-£160,000</option> <option value="180000">£160,000-£180,000</option> <option value="200000">£180,000-£200,000</option> <option value="250000">£200,000-£250,000</option> <option value="300000">£250,000-£300,000</option> <option value="300001">Above £300,000</option> </select> </td> </tr> <tr> <td colspan="2"> <h2>Contact Details</h2> </td> <td><label for="collectively">Collectively how much are your monthly payments?</label></td> <td> <input name="collectively" tabindex="18" value="£" type="text"></td> <td> </td> </tr> <tr> <td><label for="daytime">Daytime Tel:</label></td> <td> <input name="daytime" tabindex="8" type="text"></td> <td><label for="howmany">How many unsecured creditors do you have?</label></td> <td> <select name="unsecured_creditors" tabindex="19" size="1"> <option value="0">please select</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="10+">10+</option> </select> </td> </tr> <tr> <td><label for="evening">Evening Tel:</label></td> <td> <input name="evening" tabindex="9" type="text"></td> <td> </td> <td> </td> </tr> <tr> <td><label for="mobile">Mobile:</label></td> <td> <input name="mobile" tabindex="10" type="text"></td> <td colspan="2"> <h2>Additional Comments</h2> </td> <td> </td> </tr> <tr> <td><label for="email">Email:</label></td> <td> <input name="email" tabindex="11" type="text"></td> <td colspan="2" rowspan="2"><textarea rows="3" cols="40" input="" name="comments" tabindex="20" type="text"></textarea> </td> <td></td> <td> </td> </tr> <tr> <td><label for="best">Best Time to Contact:</label></td> <td> <select name="besttime" tabindex="12" size="1"> <option value="any">Any</option> <option value="am">Am</option> <option value="pm">Pm</option> </select> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td colspan="2" style="text-align: right;"> <tr> <td><input type="submit" name="submit" value="Submit"></td> </tr> </tr> <tr> </tr> <tr> </tr> <tr> <td colspan="2"><label for="help">If you require help in filling in this form please do not hesitate to contact us,</label></td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </tbody> </table> <input name="ip" value="<?php echo $_SERVER['REMOTE_ADDR']?>" type="hidden"> <input name="site" value="<?php echo $site?>" type="hidden"><input name="keyword" value="<?php echo $keyword?>" type="hidden"> <input name="site_source" value="xxxxxx.co.uk" type="hidden"> </form> When the user hits submit the form posts to the index page which the code is below: <?php extract($_REQUEST); if($submit){ // send email to you include("http://xxxxxxxx.co.uk/xxxxxxxxxxx/new-email.php"); }else{ // shows the form include("http://xxxxxxxxxxxxx.co.uk/xxxxxxxxxxx/new-apply-for-a-loan.php"); } ?> Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975267 Share on other sites More sharing options...
Deoctor Posted December 11, 2009 Share Posted December 11, 2009 DUDE seriously use the and repaste the code Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975268 Share on other sites More sharing options...
merky Posted December 11, 2009 Author Share Posted December 11, 2009 the form is on a different page, the code is below: <?php extract($_REQUEST); /* 1) fname 2) sname 3) status 4) add 5) propertyval 6) mortgagebal 7) adcredit postcode 9) appamt 10) collectively 11) daytime 12) evening 13) mobile 14) email 15) besttime */ ?> <form action="http://xxxxxxxxxxx/xxxxx/index.php" method="post" name="online"> <script language="JavaScript" type="text/JavaScript"> </script> <table> <tbody> <tr> <td class="height" colspan="2"> <h2>About You</h2> </td> <td colspan="2" class="height"> <h2>Your Property(if applicable)</h2> </td> <td class="height"> </td> </tr> <tr> <td><label for="firstname">First Name:</label></td> <td> <input name="fname" tabindex="1" type="text"></td> <td><label for="status">Status:</label></td> <td> <select name="status" tabindex="13" size="1"> <option value="0">Please Select</option> <option value="1">Homeowner</option> <option value="2">Tenant</option> <option value="3">Living with Parents</option> <option value="4">Other</option> </select> </td> </tr> <tr> <td><label for="sname">Surname:</label></td> <td> <input name="sname" tabindex="2" type="text"></td> <td><label for="propertyval">Property Value:</label></td> <td> <input name="propertyval" tabindex="14" value="£" type="text"></td> </tr> <tr> <td><label for="add">Address:</label></td> <td> <input name="address" tabindex="3" type="text"></td> <td><label for="mortgage">Mortgage Balance</label></td> <td> <input name="mortgagebal" tabindex="15" value="£" type="text"></td> </tr> <tr> <td> </td> <td> <input name="address2" tabindex="4" type="text"></td> <td> </td> <td> </td> </tr> <tr> <td><label for="town">Town:</label></td> <td> <input name="town" tabindex="5" type="text"></td> <td> <h2><label for="history">Your History</label></h2> </td> </tr> <tr> <td><label for="county">County:</label></td> <td> <input name="county" tabindex="6" type="text"></td> <td><label for="adcredit">Do you have any “adverse credit” i.e CCJs or defaults?</label></td> <td> <select name="adcredit" tabindex="16" size="1"> <option value="0">Yes</option> <option value="1">No</option> <option value="2">Unsure</option> </select> </td> </tr> <tr> <td><label for="postcode">Post Code:</label></td> <td> <input name="postcode" tabindex="7" type="text"></td> <td><label for="appamt">Approx how much unsecured debt do you have?</label></td> <td> <select name="appamt" tabindex="17" size="1"> <option value="0">Please select…</option> <option value="1000">£500-£1000</option> <option value="2000">£1000-£2000</option> <option value="3000">£2000-£3000</option> <option value="4000">£3000-£4000</option> <option value="5000">£4000-£5000</option> <option value="6000">£5000-£6000</option> <option value="7000">£6000-£7000</option> <option value="8000">£7000-£8000</option> <option value="9000">£8000-£9000</option> <option value="10000">£9000-£10,000</option> <option value="12000">£10,000-£12,000</option> <option value="14000">£12,000-£14,000</option> <option value="16000">£14,000-£16,000</option> <option value="18000">£16,000-£18,000</option> <option value="20000">£18,000-£20,000</option> <option value="22000">£20,000-£22,000</option> <option value="24000">£22,000-£24,000</option> <option value="26000">£24,000-£26,000</option> <option value="28000">£26,000-£28,000</option> <option value="30000">£28,000-£30,000</option> <option value="32000">£30,000-£32,000</option> <option value="34000">£32,000-£34,000</option> <option value="36000">£34,000-£36,000</option> <option value="38000">£36,000-£38,000</option> <option value="40000">£38,000-£40,000</option> <option value="42000">£40,000-£42,000</option> <option value="44000">£42,000-£44,000</option> <option value="46000">£44,000-£46,000</option> <option value="48000">£46,000-£48,000</option> <option value="50000">£48,000-£50,000</option> <option value="55000">£50,000-£55,000</option> <option value="60000">£55,000-£60,000</option> <option value="70000">£60,000-£70,000</option> <option value="80000">£70,000-£80,000</option> <option value="90000">£80,000-£90,000</option> <option value="100000">£90,000-£100,000</option> <option value="110000">£100,000-£110,000</option> <option value="120000">£110,000-£120,000</option> <option value="140000">£120,000-£140,000</option> <option value="160000">£140,000-£160,000</option> <option value="180000">£160,000-£180,000</option> <option value="200000">£180,000-£200,000</option> <option value="250000">£200,000-£250,000</option> <option value="300000">£250,000-£300,000</option> <option value="300001">Above £300,000</option> </select> </td> </tr> <tr> <td colspan="2"> <h2>Contact Details</h2> </td> <td><label for="collectively">Collectively how much are your monthly payments?</label></td> <td> <input name="collectively" tabindex="18" value="£" type="text"></td> <td> </td> </tr> <tr> <td><label for="daytime">Daytime Tel:</label></td> <td> <input name="daytime" tabindex="8" type="text"></td> <td><label for="howmany">How many unsecured creditors do you have?</label></td> <td> <select name="unsecured_creditors" tabindex="19" size="1"> <option value="0">please select</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="10+">10+</option> </select> </td> </tr> <tr> <td><label for="evening">Evening Tel:</label></td> <td> <input name="evening" tabindex="9" type="text"></td> <td> </td> <td> </td> </tr> <tr> <td><label for="mobile">Mobile:</label></td> <td> <input name="mobile" tabindex="10" type="text"></td> <td colspan="2"> <h2>Additional Comments</h2> </td> <td> </td> </tr> <tr> <td><label for="email">Email:</label></td> <td> <input name="email" tabindex="11" type="text"></td> <td colspan="2" rowspan="2"><textarea rows="3" cols="40" input="" name="comments" tabindex="20" type="text"></textarea> </td> <td></td> <td> </td> </tr> <tr> <td><label for="best">Best Time to Contact:</label></td> <td> <select name="besttime" tabindex="12" size="1"> <option value="any">Any</option> <option value="am">Am</option> <option value="pm">Pm</option> </select> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td colspan="2" style="text-align: right;"> <tr> <td><input type="submit" name="submit" value="Submit"></td> </tr> </tr> <tr> </tr> <tr> </tr> <tr> <td colspan="2"><label for="help">If you require help in filling in this form please do not hesitate to contact us,</label></td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </tbody> </table> <input name="ip" value="<?php echo $_SERVER['REMOTE_ADDR']?>" type="hidden"> <input name="site" value="<?php echo $site?>" type="hidden"><input name="keyword" value="<?php echo $keyword?>" type="hidden"> <input name="site_source" value="xxxxxx.co.uk" type="hidden"> </form> When the user hits submit the form posts to the index page which the code is below: <?php extract($_REQUEST); if($submit){ // send email to you include("http://xxxxxxxx.co.uk/xxxxxxxxxxx/new-email.php"); }else{ // shows the form include("http://xxxxxxxxxxxxx.co.uk/xxxxxxxxxxx/new-apply-for-a-loan.php"); } ?> <?php extract($_REQUEST); // Send email with result to the user $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'To: [email protected]' . "\r\n"; $headers .= 'From:xxxxxxx' . "\r\n"; $headers .= 'X-Mailer: PHP/' . phpversion(); // Mail it $subject = "test"; $name=$_POST['name']; echo "$name"; $message = <<<EOF <table align="center" width="95%" border="0" cellpadding="5" cellspacing="5"> <tr style="background:red;font-color:white;font-weight:strong;"> <td colspan="2">Site Information</td> </tr> <tr style="background:#F8F8F8"> <td>Site Source</td> <td>$site_source</td> </tr> <tr style="background:#EFEFEF"> <td>Keyword</td> <td>$keyword</td> </tr> <tr style="background:#F8F8F8"> <td>Site Referrer</td> <td>$site</td> </tr> <tr style="background:#EFEFEF"> <td>IP Address</td> <td>$ip</td> </tr> <tr style="background:red;font-color:white;font-weight:strong;"> <td colspan="2">App Information</td> </tr> <tr style="background:#F8F8F8"> <td>Status</td> <td>$status</td> </tr> <tr style="background:#EFEFEF"> <td>propertyval</td> <td>$propertyval</td> </tr> <tr style="background:#F8F8F8"> <td>Forename</td> <td>$fname</td> </tr> <tr style="background:#EFEFEF"> <td>Surname</td> <td>$sname</td> </tr> <tr style="background:#F8F8F8"> <td>Home Tel</td> <td>$daytime</td> </tr> <tr style="background:#EFEFEF"> <td>evening tel</td> <td>$evening</td> </tr> <tr style="background:#F8F8F8"> <td>add</td> <td>$address</td> </tr> <tr style="background:#EFEFEF"> <td>mortgagebal</td> <td>$mortgagebal</td> </tr> <tr style="background:#EFEFEF"> <td>adcredit</td> <td>$adcredit</td> </tr> <tr style="background:#EFEFEF"> <td>postcode</td> <td>$postcode</td> </tr> <tr style="background:#EFEFEF"> <td>appamt</td> <td>$appamt</td> </tr> <tr style="background:#EFEFEF"> <td>collectively</td> <td>$collectively</td> </tr> <tr style="background:#EFEFEF"> <td>howmany</td> <td>$unsecured_creditors</td> </tr> <tr style="background:#EFEFEF"> <td>mobile</td> <td>$mobile</td> </tr> <tr style="background:#EFEFEF"> <td>email</td> <td>$email</td> </tr> <tr style="background:#EFEFEF"> <td>best</td> <td>$besttime</td> </tr> </table> EOF; mail($to, $subject, $message, $headers); // show thank you page include("http://xxxxxxxxxxxxx/xxxxxxx/xxxxxx.php"); ?> The values are still blank when I receive the email. Hope the code tags are right. Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975269 Share on other sites More sharing options...
Deoctor Posted December 11, 2009 Share Posted December 11, 2009 in the first code u should check on the php tags which u are using..change it like this <input name="ip" value="<<?php echo $_SERVER['REMOTE_ADDR']; ?>>" type="hidden"> <input name="site" value="<<?php echo $site; ?>>" type="hidden"><input name="keyword" value="<<?php echo $keyword; ?>>" type="hidden"> Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975275 Share on other sites More sharing options...
merky Posted December 11, 2009 Author Share Posted December 11, 2009 I have copy and pasted that and it still does not pass the data. Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975280 Share on other sites More sharing options...
Deoctor Posted December 11, 2009 Share Posted December 11, 2009 change this page like this page <?php extract($_REQUEST); if($submit){ // send email to you include("http://xxxxxxxx.co.uk/xxxxxxxxxxx/new-email.php"); }else{ // shows the form include("http://xxxxxxxxxxxxx.co.uk/xxxxxxxxxxx/new-apply-for-a-loan.php"); } ?> by adding the following $fname=$_POST['fname']; echo "Name: ".$fname instead of include("http://xxxxxxxx.co.uk/xxxxxxxxxxx/new-email.php"); and see what u get Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975285 Share on other sites More sharing options...
merky Posted December 11, 2009 Author Share Posted December 11, 2009 I have changed the index page as below <?php extract($_REQUEST); if($submit){ $fname=$_POST['fname']; echo "Name: ".$fname; }else{ // shows the form include("http://find-uk-secured-loans.co.uk/debt-management/new-apply-for-a-loan.php"); } ?> when i hit submit on the form page now it goes to a blank page with name and the submitted data inserted. Name: bilbo baggins Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975292 Share on other sites More sharing options...
Deoctor Posted December 11, 2009 Share Posted December 11, 2009 so i think the extract($_REQUEST) is not working.. u have to pass all the values in this page as <?php extract($_REQUEST); // Send email with result to the user $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'To: [email protected]' . "\r\n"; $headers .= 'From:xxxxxxx' . "\r\n"; $headers .= 'X-Mailer: PHP/' . phpversion(); // Mail it $subject = "test"; $name=$_POST['name']; echo "$name"; $message = <<<EOF <table align="center" width="95%" border="0" cellpadding="5" cellspacing="5"> <tr style="background:red;font-color:white;font-weight:strong;"> <td colspan="2">Site Information</td> </tr> <tr style="background:#F8F8F8"> <td>Site Source</td> <td>$site_source</td> </tr> <tr style="background:#EFEFEF"> <td>Keyword</td> <td>$keyword</td> </tr> <tr style="background:#F8F8F8"> <td>Site Referrer</td> <td>$site</td> </tr> <tr style="background:#EFEFEF"> <td>IP Address</td> <td>$ip</td> </tr> <tr style="background:red;font-color:white;font-weight:strong;"> <td colspan="2">App Information</td> </tr> <tr style="background:#F8F8F8"> <td>Status</td> <td>$status</td> </tr> <tr style="background:#EFEFEF"> <td>propertyval</td> <td>$propertyval</td> </tr> <tr style="background:#F8F8F8"> <td>Forename</td> <td>$fname</td> </tr> <tr style="background:#EFEFEF"> <td>Surname</td> <td>$sname</td> </tr> <tr style="background:#F8F8F8"> <td>Home Tel</td> <td>$daytime</td> </tr> <tr style="background:#EFEFEF"> <td>evening tel</td> <td>$evening</td> </tr> <tr style="background:#F8F8F8"> <td>add</td> <td>$address</td> </tr> <tr style="background:#EFEFEF"> <td>mortgagebal</td> <td>$mortgagebal</td> </tr> <tr style="background:#EFEFEF"> <td>adcredit</td> <td>$adcredit</td> </tr> <tr style="background:#EFEFEF"> <td>postcode</td> <td>$postcode</td> </tr> <tr style="background:#EFEFEF"> <td>appamt</td> <td>$appamt</td> </tr> <tr style="background:#EFEFEF"> <td>collectively</td> <td>$collectively</td> </tr> <tr style="background:#EFEFEF"> <td>howmany</td> <td>$unsecured_creditors</td> </tr> <tr style="background:#EFEFEF"> <td>mobile</td> <td>$mobile</td> </tr> <tr style="background:#EFEFEF"> <td>email</td> <td>$email</td> </tr> <tr style="background:#EFEFEF"> <td>best</td> <td>$besttime</td> </tr> </table> EOF; mail($to, $subject, $message, $headers); // show thank you page include("http://xxxxxxxxxxxxx/xxxxxxx/xxxxxx.php"); ?> as $fname=$_POST['fname'] and so on... Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975297 Share on other sites More sharing options...
merky Posted December 11, 2009 Author Share Posted December 11, 2009 Sorry, im new to php. Not sure what you mean. Where do I have to place $fname=$_POST['fname'] on which page? Thankyou Mark Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975310 Share on other sites More sharing options...
Deoctor Posted December 11, 2009 Share Posted December 11, 2009 in the below page at this place <td>Forename</td> <td>$fname</td> Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975314 Share on other sites More sharing options...
merky Posted December 11, 2009 Author Share Posted December 11, 2009 Hi Again I have made the changes below however I am no getting this error. Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/guidefly/public_html/xxxxxxxxxxx.co.uk/xxxxxxx/new-email.php on line 19 The modified code is now <?php extract($_REQUEST); // Send email with result to the user $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'To: ' . "\r\n"; $headers .= 'From: ' . "\r\n"; $headers .= 'X-Mailer: PHP/' . phpversion(); // Mail it $subject = "Find UK Secured Loans Debt Lead"; $message = <<<EOF <table align="center" width="95%" border="0" cellpadding="5" cellspacing="5"> <tr style="background:red;font-color:white;font-weight:strong;"> <td colspan="2">Site Information</td> </tr> <tr style="background:#F8F8F8"> <td>Site Source</td> <td>$site_source</td> $site_source=$_POST['site_source'] </tr> <tr style="background:#EFEFEF"> <td>Keyword</td> <td>$keyword</td> $keyword=$_POST['keyword'] </tr> <tr style="background:#F8F8F8"> <td>Site Referrer</td> <td>$site</td> $site=$_POST['site'] </tr> <tr style="background:#EFEFEF"> <td>IP Address</td> <td>$ip</td> $ip=$_POST['ip'] </tr> <tr style="background:red;font-color:white;font-weight:strong;"> <td colspan="2">App Information</td> </tr> <tr style="background:#F8F8F8"> <td>Status</td> <td>$status</td> $status=$_POST['status'] </tr> <tr style="background:#EFEFEF"> <td>propertyval</td> <td>$propertyval</td> $propertyval=$_POST['propertyval'] </tr> <tr style="background:#F8F8F8"> <td>Forename</td> <td>$fname</td> $fname=$_POST['fname'] </tr> <tr style="background:#EFEFEF"> <td>Surname</td> <td>$sname</td> $sname=$_POST['sname'] </tr> <tr style="background:#F8F8F8"> <td>Home Tel</td> <td>$daytime</td> $daytime=$_POST['daytime'] </tr> <tr style="background:#EFEFEF"> <td>evening tel</td> <td>$evening</td> $evening=$_POST['evening'] </tr> <tr style="background:#F8F8F8"> <td>add</td> <td>$address</td> $address=$_POST['address'] </tr> <tr style="background:#EFEFEF"> <td>mortgagebal</td> <td>$mortgagebal</td> $mortgagebal=$_POST['mortgagebal'] </tr> <tr style="background:#EFEFEF"> <td>adcredit</td> <td>$adcredit</td> $adcredit=$_POST['adcredit'] </tr> <tr style="background:#EFEFEF"> <td>postcode</td> <td>$postcode</td> $postcode=$_POST['postcode'] </tr> <tr style="background:#EFEFEF"> <td>appamt</td> <td>$appamt=$_POST['appamt'] </td> </tr> <tr style="background:#EFEFEF"> <td>collectively</td> <td>$collectively</td> $collectively=$_POST['collectively'] </tr> <tr style="background:#EFEFEF"> <td>howmany</td> <td>$unsecured_creditors</td> $unsecured_creditors=$_POST['unsecured_creditors'] </tr> <tr style="background:#EFEFEF"> <td>mobile</td> <td>$mobile</td> $mobile=$_POST['mobile'] </tr> <tr style="background:#EFEFEF"> <td>email</td> <td>$email</td> $email=$_POST['email'] </tr> <tr style="background:#EFEFEF"> <td>best</td> <td>$besttime</td> $besttime=$_POST['besttime'] </tr> </table> EOF; mail($to, $subject, $message, $headers); // show thank you page include("http://ghsfhdfsh.co.uk//new-thank-you-page.php"); ?> Have I made the correct changes. Sorry for my lack of php expertise. Regards Mark Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975331 Share on other sites More sharing options...
Deoctor Posted December 11, 2009 Share Posted December 11, 2009 do one thing cut the lines which u have added and extract the variables before the $headers $site_source=$_POST['site_source']; $keyword=$_POST['keyword']; $site=$_POST['site']; $ip=$_POST['ip']; ..........so on Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975338 Share on other sites More sharing options...
merky Posted December 11, 2009 Author Share Posted December 11, 2009 Hi I have changed the code to that shown below and it is still not passing the variables. <?php extract($_REQUEST); $site_source=$_POST['site_source']; $keyword=$_POST['keyword']; $site=$_POST['site']; $ip=$_POST['ip']; $status=$_POST['status']; $propertyval=$_POST['propertyval']; $fname=$_POST['fname']; $sname=$_POST['sname']; $daytime=$_POST['daytime']; $evening=$_POST['evening']; $address=$_POST['address']; $mortgagebal=$_POST['mortgagebal']; $adcredit=$_POST['adcredit']; $postcode=$_POST['postcode']; $appamt=$_POST['appamt']; $collectively=$_POST['collectively']; $unsecured_creditors=$_POST['unsecured_creditors']; $mobile=$_POST['mobile']; $email=$_POST['email']; $besttime=$_POST['besttime']; // Send email with result to the user $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'To: [email protected]' . "\r\n"; $headers .= 'From: xxxxxxxxxxxxxx' . "\r\n"; $headers .= 'X-Mailer: PHP/' . phpversion(); // Mail it $subject = "xxxxxxxxxxxxxxx"; $message = <<<EOF <table align="center" width="95%" border="0" cellpadding="5" cellspacing="5"> <tr style="background:red;font-color:white;font-weight:strong;"> <td colspan="2">Site Information</td> </tr> <tr style="background:#F8F8F8"> <td>Site Source</td> <td>$site_source</td> </tr> <tr style="background:#EFEFEF"> <td>Keyword</td> <td>$keyword</td> </tr> <tr style="background:#F8F8F8"> <td>Site Referrer</td> <td>$site</td> </tr> <tr style="background:#EFEFEF"> <td>IP Address</td> <td>$ip</td> </tr> <tr style="background:red;font-color:white;font-weight:strong;"> <td colspan="2">App Information</td> </tr> <tr style="background:#F8F8F8"> <td>Status</td> <td>$status</td> </tr> <tr style="background:#EFEFEF"> <td>propertyval</td> <td>$propertyval</td> </tr> <tr style="background:#F8F8F8"> <td>Forename</td> <td>$fname</td> </tr> <tr style="background:#EFEFEF"> <td>Surname</td> <td>$sname</td> </tr> <tr style="background:#F8F8F8"> <td>Home Tel</td> <td>$daytime</td> </tr> <tr style="background:#EFEFEF"> <td>evening tel</td> <td>$evening</td> </tr> <tr style="background:#F8F8F8"> <td>add</td> <td>$address</td> </tr> <tr style="background:#EFEFEF"> <td>mortgagebal</td> <td>$mortgagebal</td> </tr> <tr style="background:#EFEFEF"> <td>adcredit</td> <td>$adcredit</td> </tr> <tr style="background:#EFEFEF"> <td>postcode</td> <td>$postcode</td> </tr> <tr style="background:#EFEFEF"> <td>appamt</td> <td>$appamt</td> </tr> <tr style="background:#EFEFEF"> <td>collectively</td> <td>$collectively</td> </tr> <tr style="background:#EFEFEF"> <td>howmany</td> <td>$unsecured_creditors</td> </tr> <tr style="background:#EFEFEF"> <td>mobile</td> <td>$mobile</td> </tr> <tr style="background:#EFEFEF"> <td>email</td> <td>$email</td> </tr> <tr style="background:#EFEFEF"> <td>best</td> <td>$besttime</td> </tr> </table> EOF; mail($to, $subject, $message, $headers); // show thank you page include("http://xxxxxxxxx.co.uk/xxxxxxxxx/new-thank-you-page.php"); ?> Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975354 Share on other sites More sharing options...
Deoctor Posted December 11, 2009 Share Posted December 11, 2009 hai i have redone the code.check this out and it is working fine.. 6.php <?php $site_source=$_POST['site_source']; $keyword=$_POST['keyword']; $site=$_POST['site']; $ip=$_POST['ip']; $status=$_POST['status']; $propertyval=$_POST['propertyval']; $fname=$_POST['fname']; $sname=$_POST['sname']; $daytime=$_POST['daytime']; $evening=$_POST['evening']; $address=$_POST['address']; $mortgagebal=$_POST['mortgagebal']; $adcredit=$_POST['adcredit']; $postcode=$_POST['postcode']; $appamt=$_POST['appamt']; $collectively=$_POST['collectively']; $unsecured_creditors=$_POST['unsecured_creditors']; $mobile=$_POST['mobile']; $email=$_POST['email']; $besttime=$_POST['besttime']; // Send email with result to the user $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'To: [email protected]' . "\r\n"; $headers .= 'From: xxxxxxxxxxxxxx' . "\r\n"; $headers .= 'X-Mailer: PHP/' . phpversion(); // Mail it $subject = "xxxxxxxxxxxxxxx"; $message = <<<EOF <table align="center" width="95%" border="0" cellpadding="5" cellspacing="5"> <tr style="background:red;font-color:white;font-weight:strong;"> <td colspan="2">Site Information</td> </tr> <tr style="background:#F8F8F8"> <td>Site Source</td> <td>$site_source</td> </tr> <tr style="background:#EFEFEF"> <td>Keyword</td> <td>$keyword</td> </tr> <tr style="background:#F8F8F8"> <td>Site Referrer</td> <td>$site</td> </tr> <tr style="background:#EFEFEF"> <td>IP Address</td> <td>$ip</td> </tr> <tr style="background:red;font-color:white;font-weight:strong;"> <td colspan="2">App Information</td> </tr> <tr style="background:#F8F8F8"> <td>Status</td> <td>$status</td> </tr> <tr style="background:#EFEFEF"> <td>propertyval</td> <td>$propertyval</td> </tr> <tr style="background:#F8F8F8"> <td>Forename</td> <td>$fname</td> </tr> <tr style="background:#EFEFEF"> <td>Surname</td> <td>$sname</td> </tr> <tr style="background:#F8F8F8"> <td>Home Tel</td> <td>$daytime</td> </tr> <tr style="background:#EFEFEF"> <td>evening tel</td> <td>$evening</td> </tr> <tr style="background:#F8F8F8"> <td>add</td> <td>$address</td> </tr> <tr style="background:#EFEFEF"> <td>mortgagebal</td> <td>$mortgagebal</td> </tr> <tr style="background:#EFEFEF"> <td>adcredit</td> <td>$adcredit</td> </tr> <tr style="background:#EFEFEF"> <td>postcode</td> <td>$postcode</td> </tr> <tr style="background:#EFEFEF"> <td>appamt</td> <td>$appamt</td> </tr> <tr style="background:#EFEFEF"> <td>collectively</td> <td>$collectively</td> </tr> <tr style="background:#EFEFEF"> <td>howmany</td> <td>$unsecured_creditors</td> </tr> <tr style="background:#EFEFEF"> <td>mobile</td> <td>$mobile</td> </tr> <tr style="background:#EFEFEF"> <td>email</td> <td>$email</td> </tr> <tr style="background:#EFEFEF"> <td>best</td> <td>$besttime</td> </tr> </table> EOF; echo $message; ?> 7.php <?php extract($_REQUEST); /* 1) fname 2) sname 3) status 4) add 5) propertyval 6) mortgagebal 7) adcredit postcode 9) appamt 10) collectively 11) daytime 12) evening 13) mobile 14) email 15) besttime */ ?> <form action="6.php" method="post" name="online"> <table> <tbody> <tr> <td class="height" colspan="2"> <h2>About You</h2> </td> <td colspan="2" class="height"> <h2>Your Property(if applicable)</h2> </td> <td class="height"> </td> </tr> <tr> <td><label for="firstname">First Name:</label></td> <td><input name="fname" tabindex="1" type="text"></td> <td><label for="status">Status:</label></td> <td><select name="status" tabindex="13" size="1"> <option value="0">Please Select</option> <option value="1">Homeowner</option> <option value="2">Tenant</option> <option value="3">Living with Parents</option> <option value="4">Other</option> </select> </td> </tr> <tr> <td><label for="sname">Surname:</label></td> <td> <input name="sname" tabindex="2" type="text"></td> <td><label for="propertyval">Property Value:</label></td> <td> <input name="propertyval" tabindex="14" value="£" type="text"></td> </tr> <tr> <td><label for="add">Address:</label></td> <td> <input name="address" tabindex="3" type="text"></td> <td><label for="mortgage">Mortgage Balance</label></td> <td> <input name="mortgagebal" tabindex="15" value="£" type="text"></td> </tr> <tr> <td> </td> <td> <input name="address2" tabindex="4" type="text"></td> <td> </td> <td> </td> </tr> <tr> <td><label for="town">Town:</label></td> <td> <input name="town" tabindex="5" type="text"></td> <td> <h2><label for="history">Your History</label></h2> </td> </tr> <tr> <td><label for="county">County:</label></td> <td> <input name="county" tabindex="6" type="text"></td> <td><label for="adcredit">Do you have any “adverse credit” i.e CCJs or defaults?</label></td> <td> <select name="adcredit" tabindex="16" size="1"> <option value="0">Yes</option> <option value="1">No</option> <option value="2">Unsure</option> </select> </td> </tr> <tr> <td><label for="postcode">Post Code:</label></td> <td> <input name="postcode" tabindex="7" type="text"></td> <td><label for="appamt">Approx how much unsecured debt do you have?</label></td> <td> <select name="appamt" tabindex="17" size="1"> <option value="0">Please select…</option> <option value="1000">£500-£1000</option> <option value="2000">£1000-£2000</option> <option value="3000">£2000-£3000</option> <option value="4000">£3000-£4000</option> <option value="5000">£4000-£5000</option> <option value="6000">£5000-£6000</option> <option value="7000">£6000-£7000</option> <option value="8000">£7000-£8000</option> <option value="9000">£8000-£9000</option> <option value="10000">£9000-£10,000</option> <option value="12000">£10,000-£12,000</option> <option value="14000">£12,000-£14,000</option> <option value="16000">£14,000-£16,000</option> <option value="18000">£16,000-£18,000</option> <option value="20000">£18,000-£20,000</option> <option value="22000">£20,000-£22,000</option> <option value="24000">£22,000-£24,000</option> <option value="26000">£24,000-£26,000</option> <option value="28000">£26,000-£28,000</option> <option value="30000">£28,000-£30,000</option> <option value="32000">£30,000-£32,000</option> </select> </td> </tr> <tr> <td colspan="2"> <h2>Contact Details</h2> </td> <td><label for="collectively">Collectively how much are your monthly payments?</label></td> <td> <input name="collectively" tabindex="18" value="£" type="text"></td> <td> </td> </tr> <tr> <td><label for="daytime">Daytime Tel:</label></td> <td> <input name="daytime" tabindex="8" type="text"></td> <td><label for="howmany">How many unsecured creditors do you have?</label></td> <td> <select name="unsecured_creditors" tabindex="19" size="1"> <option value="0">please select</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="10+">10+</option> </select> </td> </tr> <tr> <td><label for="evening">Evening Tel:</label></td> <td> <input name="evening" tabindex="9" type="text"></td> <td> </td> <td> </td> </tr> <tr> <td><label for="mobile">Mobile:</label></td> <td> <input name="mobile" tabindex="10" type="text"></td> <td colspan="2"> <h2>Additional Comments</h2> </td> <td> </td> </tr> <tr> <td><label for="email">Email:</label></td> <td> <input name="email" tabindex="11" type="text"></td> <td colspan="2" rowspan="2"> <textarea rows="3" cols="40" input="" name="comments" tabindex="20" type="text"></textarea> </td> <td></td> <td> </td> </tr> <tr> <td><label for="best">Best Time to Contact:</label></td> <td> <select name="besttime" tabindex="12" size="1"> <option value="any">Any</option> <option value="am">Am</option> <option value="pm">Pm</option> </select> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td colspan="2" style="text-align: right;"></td> <tr> <td><input type="submit" name="submit" value="Submit"></td> </tr> </tr> <tr> </tr> <tr> </tr> <tr> <td colspan="2"><label for="help">If you require help in filling in this form please do not hesitate to contact us,</label></td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </tbody> </table> <input name="ip" value="<<?php echo $_SERVER['REMOTE_ADDR']?>>" type="hidden"> <input name="site" value="<<?php echo $site ?>>" type="hidden"> <input name="keyword" value="<<?php echo $keyword ?>>" type="hidden"> <input name="site_source" value="xxxxxx.co.uk" type="hidden"> </form> hoe this would resolve the issue Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975363 Share on other sites More sharing options...
merky Posted December 11, 2009 Author Share Posted December 11, 2009 Hi Im afraid all that happens with your script is it the browser window changes with new-email.php in the tab and a blank template with no variables showing in the browser window. I receive no email. Mark Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975373 Share on other sites More sharing options...
Deoctor Posted December 11, 2009 Share Posted December 11, 2009 this is happening coz,, in the 6.php i have given an echo for message.. if the webpage is showing u the values then write the mail function mail($to, $subject, $message, $headers); this will send u the mails. i just wanted to check whether the values are getting picked up correctly.. Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975375 Share on other sites More sharing options...
merky Posted December 11, 2009 Author Share Posted December 11, 2009 Hi The webpage is not showing the values, only the title of the values site source, keyword, ip etc. It is blank where the inputted form data should be. Thanks, I appreciate the help. Mark Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975379 Share on other sites More sharing options...
Deoctor Posted December 11, 2009 Share Posted December 11, 2009 this could not happen,, skype me at chaitanya09986025424 Link to comment https://forums.phpfreaks.com/topic/184663-help-please-php-form-to-email/#findComment-975381 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.