Jump to content

[SOLVED] Getting Return Document on Submit back into Website Form


Recommended Posts

 

This maybe more of a HTML issue but being generated by PHP script so hope someone here can help. If you select the Agree & Submit button at http://www.picnicracing.com.au/mailit.php (no need to validate fields) the return form gets thrown out to the right of the web site. Any idea what needs to change to get this to return within the site ?

 

<?php

//check if the submit button has been pressed. 
$submit = $_GET['submit'];  

//if the submit button has been pressed, send the email
if ($submit == 'true')
{

require_once "Mailit.php";

$from = $_POST[Email];
$subject = $_POST[txtSubject];
$content = "Title: " .$_POST[txtTitle]. "\r\n";
$content .= "FirstName: " .$_POST[FirstName]. "\r\n";
$content .= "LastName: " .$_POST[LastName]. "\r\n";
$content .= "Date of Birth: " .$_POST[txtDay];
$content .= "/" .$_POST[txtMonth];
$content .= "/" .$_POST[txtYear]. "\r\n";
$content .= "Drivers Lic/Passport Number: " .$_POST[txtDrivers]. "\r\n";
$content .= "Main Contact Number: " .$_POST[MainContactNumber]. "\r\n";
$content .= "Business Number: " .$_POST[txtBusiness]. "\r\n";
$content .= "Mobile Number: " .$_POST[txtMobile]. "\r\n";
$content .= "Street Address: " .$_POST[streetAddress]. "\r\n";
$content .= "Suburb: " .$_POST[suburb]. "\r\n";
$content .= "City: " .$_POST[txtCity]. "\r\n";
$content .= "State: " .$_POST[state]. "\r\n";
$content .= "Postcode: " .$_POST[Postcode]. "\r\n";
$content .= "Country: " .$_POST[Country]. "\r\n";
$content .= "Mailing Street Address: " .$_POST[txtMailStreetAddress]. "\r\n";
$content .= "Mailing Suburb: " .$_POST[txtMailSuburb]. "\r\n";
$content .= "Mailing City: " .$_POST[txtMailCity]. "\r\n";
$content .= "Mailing State: " .$_POST[txtMailState]. "\r\n";
$content .= "Mailing Postcode: " .$_POST[txtMailPostcode]. "\r\n";
$content .= "Mailing Country: " .$_POST[txtMailCountry]. "\r\n";
$content .= "Account Type: " .$_POST[txtAccounts]. "\r\n";


$to = "";     // this is the email address to send the form results to

$host = "localhost";
$username = "";      // replace with your email address hosted by MD Webhosting
$password = "";                 // replace with the password for your email address 

$headers = array ('From' => $from,
   'To' => $to,
   'Subject' => $subject);

$smtp = Mail::factory('smtp',
   array ('host' => $host,
     'auth' => true,
     'username' => $username,
     'password' => $password));

$mail = $smtp->send($to, $headers, $content); 

if (PEAR::isError($mail)) {
   echo("<p>" . $mail->getMessage() . "</p>");
  } else {
  "<a href='PeterBonConfirmation.html'></a>";
  }

}

// if the submit button has not been pressed, display the email form

else 

{ 
?>

after reading 5 times your question i did understood what you mean  :(

 

look here

this is your code

if ($submit == 'true')
{

 

you should change it with

 

if ($submit == 'true' && !empty($_POST['Email']) && !empty($_POST['txtSubject']) and so on till you finish all the fields  )
{

 

hope it helps

 

If you access the url link above and Submit the form, you will see what happens with the form response. This gives a clear picture of the problem. I don't think what you have responded with solves what I am trying to fix.

i know what you mean :)

you need to check if fields are completed,and to proced to that page (when you click submit now) only if fields are completed  ;D

 

thats what i understood,if this is not what you want please explain again

From what I can see you're not outputting the rest of the page after the PHP output.. you look at the source before the form is submitted and you can see a closing body and html tag, but when you look at the source after the form is submitted and there's no body or html tag and it ends with:

 

<p>Failed to set sender: @localhost [sMTP: Invalid response code received from server (code: 501, response: <@localhost>: no local part)]</p>

 

So basically after your script you need to output the rest of the page and that will make it align correctly..

 

Adam

 if (PEAR::isError($mail)) {
   echo("<p>" . $mail->getMessage() . "</p>");

  } else {
  "<a href='PeterBonConfirmation.html'></a>";
  }

 

That's whats printing out:

<p>Failed to set sender: @localhost [sMTP: Invalid response code received from server (code: 501, response: <@localhost>: no local part)]</p>

 

Perhaps show us the entire script, mainly after what you've shown us already??

 

I've seen it happen before, all it is is the HTML after the script would contain a closing tag or another column which forces the form back into it's right place... If you notice after the form is submitted the adverts on the right side dissapear...

 

Adam

 

Thanks Adam. I think you are right in the diagnosis, problem is trying to find the problem code.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/PicnicRacing.dwt" codeOutsideHTMLIsLocked="false" -->
<!-- DW6 -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>New Phone Account</title>
<!-- InstanceEndEditable --> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="description" content="Guide to Picnic Racing & Picnic Races provides a wide range of information on Victorian Picnic Racing events. Picnic Race clubs cater for all the needs of the Picnic Racing patron in a relaxed family friendly racing environment. Full picnic race & metropolitan betting facilities are available with either Bookmakers or on-course picnic racing totes."/> <meta name="keywords" content="picnic races, picnic racing, picnicbet.com, picnicbet.com.au, horse racing, melbourne cup, betting, bookmaker, picnic, derby day, peter bon, woolamai picnic races, healesville picnic races, balnarring picnic races, yea picnic races, alexandra picnic races, dederang picnic races, merton picnic races, mansfield picnic races, colac picnic races, pakenham picnic races, buchan picnic races, swifts creek picnic races, tambo valley picnic races, omeo picnic races, drouin picnic races"/> <meta name="robots" content="index,follow" />
<meta name="verify-v1" content="D/2Tm//JFW7N5ihRIJmSuTRZ2T4ZQvswrMSgAE3zL/w=" />
<link rel="stylesheet" href="mm_picnic.css" type="text/css" />
<script language="JavaScript" type="text/javascript">
//--------------- LOCALIZEABLE GLOBALS ---------------
var d=new Date();
var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
//Ensure correct for language. English is "January 1, 2004"
var TODAY = monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();
//---------------   END LOCALIZEABLE   ---------------
</script>
<style type="text/css">
<!--
.style3 {color: #016B18}
.style5 {color: #FFFFFF; font-size: large; }
.style10 {color: #FF0000}
-->
</style>
<script type="text/javascript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<!-- InstanceBeginEditable name="head" -->
<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
//-->
</script>
<!-- InstanceEndEditable -->
</head>
<body bgcolor="#C0DFFD">
<table width="1003" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="6" rowspan="2"><a href="index.html"><img src="Assets/PicnicPunters.gif" alt="Punter's Guide to Picnic Racing Home" width="167" height="112" border="0" /></a><img src="Assets/woolamai.jpg" width="412" height="112" /><img src="Assets/woolamaiflip.jpg" width="412" height="112" /></td>
 <td width="10"><img src="mm_spacer.gif" alt="" width="10" height="0" border="0" /></td>
  </tr>
  <tr bgcolor="#3366CC"></tr>
  <tr >
  	<td height="30" bgcolor="#387C2B" id="dateformat">  
    <script language="JavaScript" type="text/javascript">
      document.write(TODAY);</script></td>
<td colspan="2
" bgcolor="#8AB92D" id="tagline"><!-- InstanceBeginEditable name="EditRegion2" -->
  <div align="left"><span class="style5">PicnicBet.com - New  Phone Account </span></div>
<!-- InstanceEndEditable --></td>   
    <td colspan="3
" bgcolor="#8AB92D" id="tagline"><div align="right"><span class="style3">Picnic Bookies</span> <span class="style10">Always a Better Bet !</span> </div></td>
  </tr>
<tr>
    <td colspan="6" bgcolor="#003366"></td>
  </tr>

<tr>
    <td width="168" valign="top" bgcolor="#89B92D">
<table border="0" cellspacing="0" cellpadding="0" width="168" id="navigation">
        <tr>
          <td width="168" >
<!-- Google CSE Search Box Begins  -->
<form action="http://www.picnicracing.com.au/searchresults.html" id="searchbox_000078263159025743370:pts-tnrhqr8">
  <input type="hidden" name="cx" value="000078263159025743370:pts-tnrhqr8" />
  <input type="hidden" name="cof" value="FORID:9" />
  <br />
  <input type="text" name="q" size="16" />
  <input type="submit" name="sa" value="Go" />
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_000078263159025743370%3Apts-tnrhqr8"></script>
<!-- Google CSE Search Box Ends --></td>
        </tr>
        <tr>
          <td width="168" align="left" valign="middle"><a href="index.html" class="navText">Latest News </a></td>
        </tr>
	<tr>
          <td width="168" align="left" valign="middle"><a href="News07/PastNews20072008Season.html" class="navText">Past News </a></td>
        </tr>
	<tr>
         <td width="168"><a href="http://www.picnicracing.com.au/picniclist/?p=subscribe&id=1" target="_blank" class="navText"> Subscribe to News </a></td>
        </tr>
        <tr>
          <td width="168"><a href="AboutPicnicRacing.html" class="navText">About Picnic Racing</a></td>
        </tr>
        <tr>
          <td width="168"><a href="PicnicCalendar.html" class="navText">Picnic Calendar</a></td>
        </tr>
	<!--<tr>
          <td width="168"><a href="http://www.picnicracing.com.au/~picnicra/phpBB/phpBB2/" target="_blank" class="navText">Picnic Forum</a></td>
        </tr>-->
        <tr>
          <td width="168"><a href="PicnicTracks.html" class="navText">Picnic Racetracks</a></td>
        </tr>
        <tr>
          <td width="168"><a href="PicnicFormguides.html" class="navText">Picnic Formguides</a></td>
        </tr>
          <!--<tr>
	  <td width="168"><a href="http://www.picnicracing.com.au/classified_lite_v204/index.php" target="_blank" class="navText">Free Picnic Classifieds</a></td>
        </tr>-->
	<tr>
          <td width="168"><a href="PeterBon.html" class="navText">The Betting Ring</a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicJockeys.html" class="navText">Picnic Jockeys</a></td>
        </tr>
	<!--<tr>
          <td width="168"><a href="../PicnicTrainers.html" class="navText">Picnic Trainers</a></td>
        </tr>-->
	<tr>
          <td width="168"><a href="PicnicCups.html" class="navText">Picnic Cup Video Clips </a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicRaceResults.html" class="navText">Picnic Race Results </a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicStats/Jockey20072008.html" class="navText">Picnic Jockeys Results </a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicStats/Trainer20072008.html" class="navText">Picnic Trainer Results</a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicStats/Horse20072008.html" class="navText">Picnic Horse Results </a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicRaceConditions.html">Picnic Race Conditions</a></td>
        </tr>
	<tr>
          <td width="168"><a href="http://picnicracing.com.au/gallery/" target="_blank">Picture Gallery</a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicFAQ.html" class="navText">FAQs</a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicWeather.html" class="navText">Weather Forecasts</a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicContactUs.html" class="navText">About-Contact Us</a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicLinks.html" class="navText">Links</a></td>
        </tr>
      </table>
<br />
  	 <br />
  	 <br />
  	 <br />
    <td width="20"><img src="mm_spacer.gif" alt="" width="20" height="1" border="0" /></td>
    <td colspan="2" valign="top"><img src="mm_spacer.gif" alt="" width="305" height="1" border="0" /><br />

<!-- InstanceBeginEditable name="EditRegion1" -->
<table border="0" cellspacing="0" cellpadding="0" width="659">
      <tr>
        <td colspan="5" class="pageName"> </td>
      </tr>
      <tr>
        <td width="252" bordercolor="#000000" bgcolor="#000000" class="bodyText"><div align="center" class="style10"><a href="PeterBon2.html" class="style10"><strong>		Home to PicnicBet.com </strong></a> </div></td>
        <td width="173" bgcolor="#000000" class="bodyText"><div align="center" class="style10"><a href="PeterBonBanking.html" class="style10"><strong>Banking Info</strong></a> </div></td>
        <td width="133" bgcolor="#000000" class="bodyText"><div align="center" class="style10"><a href="PeterBonFAQ.html" class="style10"><strong>FAQs</strong></a></div></td>
        <td width="101" bgcolor="#000000" class="bodyText"><div align="center" class="style10"><a href="PeterBonContact.html" class="style10"><strong>Contact Us</strong></a> </div></td>
      </tr>
      
      <tr>
       <td colspan="4" class="bodyText"><p><br />
        Fill in and submit the form below to create a Telephone Betting Account. Once complete, go to the <a href="PeterBonBanking.html">Banking Info</a> section to deposit funds into your account. <br />
        Fields marked with a <span class="style10">*</span> are mandatory. </p>       </td>
      </tr>
    </table>

<?php

//check if the submit button has been pressed. 
$submit = $_GET['submit'];  

//if the submit button has been pressed, send the email
if ($submit == 'true')
{

require_once "Mail.php";

$from = $_POST[Email];
$subject = $_POST[txtSubject];
$content = "Title: " .$_POST[txtTitle]. "\r\n";
$content .= "FirstName: " .$_POST[FirstName]. "\r\n";
$content .= "LastName: " .$_POST[LastName]. "\r\n";
$content .= "Date of Birth: " .$_POST[txtDay];
$content .= "/" .$_POST[txtMonth];
$content .= "/" .$_POST[txtYear]. "\r\n";
$content .= "Drivers Lic/Passport Number: " .$_POST[txtDrivers]. "\r\n";
$content .= "Main Contact Number: " .$_POST[MainContactNumber]. "\r\n";
$content .= "Business Number: " .$_POST[txtBusiness]. "\r\n";
$content .= "Mobile Number: " .$_POST[txtMobile]. "\r\n";
$content .= "Street Address: " .$_POST[streetAddress]. "\r\n";
$content .= "Suburb: " .$_POST[suburb]. "\r\n";
$content .= "City: " .$_POST[txtCity]. "\r\n";
$content .= "State: " .$_POST[state]. "\r\n";
$content .= "Postcode: " .$_POST[Postcode]. "\r\n";
$content .= "Country: " .$_POST[Country]. "\r\n";
$content .= "Mailing Street Address: " .$_POST[txtMailStreetAddress]. "\r\n";
$content .= "Mailing Suburb: " .$_POST[txtMailSuburb]. "\r\n";
$content .= "Mailing City: " .$_POST[txtMailCity]. "\r\n";
$content .= "Mailing State: " .$_POST[txtMailState]. "\r\n";
$content .= "Mailing Postcode: " .$_POST[txtMailPostcode]. "\r\n";
$content .= "Mailing Country: " .$_POST[txtMailCountry]. "\r\n";
$content .= "Account Type: " .$_POST[txtAccounts]. "\r\n";


$to = "admin@picnicbet.com";     // this is the email address to send the form results to

$host = "localhost";
$username = "";      // replace with your email address hosted by MD Webhosting
$password = "";                 // replace with the password for your email address 

$headers = array ('From' => $from,
   'To' => $to,
   'Subject' => $subject);

$smtp = Mail::factory('smtp',
   array ('host' => $host,
     'auth' => true,
     'username' => $username,
     'password' => $password));

$mail = $smtp->send($to, $headers, $content); 

if (PEAR::isError($mail)) {
   echo("<p>" . $mail->getMessage() . "</p>");
  } else {
  "<a href='PeterBonConfirmation.html'></a>";
  }

}

// if the submit button has not been pressed, display the email form

else 

{ 
?>
<table width="653" border="0">
  <form action="mail.php?submit=true" method="post">
<tr>
    <td width="199" bgcolor="#C0DFFD"><strong>CUSTOMER DETAILS </strong></td>
</tr>

<tr>
    <td colspan="2" bgcolor="#CCCCCC" width="45"><input type="hidden" name="txtSubject" value="New Account"></td>
</tr>
<tr>
     <td colspan="2" bgcolor="#CCCCCC"><label>Title</label></td>
     <td width="395" colspan="2" bgcolor="#CCCCCC"><select name="txtTitle">
         <option>Mr</option>
         <option>Mrs</option>
         <option>Ms</option>
         <option>Miss</option>
     </select></td>
</tr> 
<tr>
      <td colspan="2" bgcolor="#CCCCCC">First Name<span class="style10">*</span> </td>
      <td colspan="2" bgcolor="#CCCCCC"><input name="FirstName" type="text" /></td>
</tr>
<tr>
      <td colspan="2" bgcolor="#CCCCCC">Last Name<span class="style10">*</span> </td>
      <td colspan="2" bgcolor="#CCCCCC"><input name="LastName" type="text" /></td>
</tr> 
<tr>
                <td colspan="2" bgcolor="#CCCCCC">Date of Birth<span class="style10">*</span> (Must be 18yo or over) </td>
                <td colspan="2" bgcolor="#CCCCCC"><select name="txtDay">
                  <option>01</option>
                  <option>02</option>
                  <option>03</option>
                  <option>04</option>
                  <option>05</option>
                  <option>06</option>
                  <option>07</option>
                  <option>08</option>
                  <option>09</option>
                  <option>10</option>
                  <option>11</option>
                  <option>12</option>
                  <option>13</option>
                  <option>14</option>
                  <option>15</option>
                  <option>16</option>
                  <option>17</option>
                  <option>18</option>
                  <option>19</option>
                  <option>20</option>
                  <option>21</option>
                  <option>22</option>
                  <option>23</option>
                  <option>24</option>
                  <option>25</option>
                  <option>26</option>
                  <option>27</option>
                  <option>28</option>
                  <option>29</option>
                  <option>30</option>
                  <option>31</option>
                </select>
                 / 
                 <select name="txtMonth">
                   <option>01</option>
                   <option>02</option>
                   <option>03</option>
                   <option>04</option>
                   <option>05</option>
                   <option>06</option>
                   <option>07</option>
                   <option>08</option>
                   <option>09</option>
                   <option>10</option>
                   <option>11</option>
                   <option>12</option>
                 </select>
                  / 
                  <select name="txtYear">
                    <option>2000</option>
                    <option>1999</option>
                    <option>1998</option>
                    <option>1997</option>
                    <option>1996</option>
                    <option>1995</option>
                    <option>1994</option>
                    <option>1993</option>
                    <option>1992</option>
                    <option>1991</option>
                    <option>1990</option>
                    <option>1989</option>
                    <option>1988</option>
                    <option>1987</option>
                    <option>1986</option>
                    <option>1985</option>
                    <option>1984</option>
                    <option>1983</option>
                    <option>1982</option>
                    <option>1981</option>
                    <option>1980</option>
                    <option>1979</option>
                    <option>1978</option>
                    <option>1977</option>
                    <option>1976</option>
                    <option>1975</option>
                    <option>1974</option>
                    <option>1973</option>
                    <option>1972</option>
                    <option>1971</option>
                    <option>1970</option>
                    <option>1969</option>
                    <option>1968</option>
                    <option>1967</option>
                    <option>1966</option>
                    <option>1965</option>
                    <option>1964</option>
                    <option>1963</option>
                    <option>1962</option>
                    <option>1961</option>
                    <option>1960</option>
                    <option>1959</option>
                    <option>1958</option>
                    <option>1957</option>
                    <option>1956</option>
                    <option>1955</option>
                    <option>1954</option>
                    <option>1953</option>
                    <option>1952</option>
                    <option>1951</option>
                    <option>1950</option>
                    <option>1949</option>
                    <option>1948</option>
                    <option>1947</option>
                    <option>1946</option>
                    <option>1945</option>
                    <option>1944</option>
                    <option>1943</option>
                    <option>1942</option>
                    <option>1941</option>
                    <option>1940</option>
                    <option>1939</option>
                    <option>1938</option>
                    <option>1937</option>
                    <option>1936</option>
                    <option>1935</option>
                    <option>1934</option>
                    <option>1933</option>
                    <option>1932</option>
                    <option>1931</option>
                    <option>1930</option>
                    <option>1929</option>
                    <option>1928</option>
                    <option>1927</option>
                    <option>1926</option>
                    <option>1925</option>
                    <option>1924</option>
                    <option>1923</option>
                    <option>1922</option>
                    <option>1921</option>
                    <option>1920</option>
                    <option>1919</option>
                    <option>1918</option>
                    <option>1917</option>
                    <option>1916</option>
                    <option>1915</option>
                    <option>1914</option>
                    <option>1913</option>
                    <option>1912</option>
                    <option>1911</option>
                    <option>1910</option>
                    <option>1909</option>
                    <option>1908</option>
                    <option>1907</option>
                    <option>1906</option>
                    <option>1905</option>
                    <option>1904</option>
                    <option>1903</option>
                    <option>1902</option>
                    <option>1901</option>
                    <option>1900</option>
                  </select>                  </td>
          </tr>
		  <tr>
    <td colspan="2" bgcolor="#CCCCCC">Your Email Address<span class="style10">*</span> </td>
<td colspan="2" bgcolor="#CCCCCC"><input name="Email" type="text" /></td>
</tr>
		  <tr>
                <td colspan="2" bgcolor="#CCCCCC">Drivers Lic / Passport Number</td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtDrivers" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Main Contact Number<span class="style10">*</span> </td>
                <td colspan="2" bgcolor="#CCCCCC"><input name="MainContactNumber" type="text" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">and/or Business Number</td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtBusiness" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Mobile Number</td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtMobile" /></td>
              </tr>
              <tr>
                <td colspan="4" bgcolor="#C0DFFD"><strong><br />
                  RESIDENTIAL ADDRESS </strong></td>
              </tr>
		  <tr>
                <td colspan="2" bgcolor="#CCCCCC">Street Address<span class="style10">*</span></td>
                <td colspan="2" bgcolor="#CCCCCC"><input name="StreetAddress" type="text" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Suburb<span class="style10">*</span></td>
                <td colspan="2" bgcolor="#CCCCCC"><input name="Suburb" type="text" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">City</td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtCity" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">State/Province<span class="style10">*</span></td>
                <td colspan="2" bgcolor="#CCCCCC"><input name="State" type="text" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Postcode/Zip<span class="style10">*</span></td>
                <td colspan="2" bgcolor="#CCCCCC"><input name="Postcode" type="text" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Country<span class="style10">*</span></td>
                <td colspan="2" bgcolor="#CCCCCC"><input name="Country" type="text" /></td>
              </tr>
		  <tr>
                <td colspan="4" bgcolor="#C0DFFD"><strong><br />
                  MAILING ADDRESS</strong> </td>
          </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Same as Above </td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="checkbox" name="checkbox" value="checkbox" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Street Address </td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtMailStreetAddress" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Suburb</td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtMailSuburb" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">City</td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtMailCity" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">State/Province</td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtMailState" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Postcode/Zip</td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtMailPostcode" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Country</td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtMailCountry" /></td>
              </tr>
		  
		  <tr>
                <td colspan="4" bgcolor="#C0DFFD"><strong><br />
                  ACCOUNT SETTINGS</strong> </td>
          </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Statements & Frequency </td>
                <td colspan="2" bgcolor="#CCCCCC"><select name="txtAccounts">
                  <option>Monthly Statement by Email</option>
                  <option>Monthly Printed Statement by Mail</option>
                </select>                </td>
              </tr>
              <tr>
                <td colspan="4" bgcolor="#C0DFFD"><strong><br />
                  TERMS & CONDITIONS</strong> </td>
          </tr>
              <tr>
                <td height="53" colspan="4" bgcolor="#CCCCCC"><textarea name="textarea" cols="70" rows="10">Terms and Conditions

1. Acceptance

To enable you to place bets you need to read and understand the following Terms & Conditions and Privacy Statement and accept those Terms & Conditions and Privacy Statement (by clicking "I Accept and Submit" at the end of the Terms & Conditions and Privacy Statement). If you do not accept the Terms & Conditions and Privacy Statement, you will not be able to place bets using the Telephone Betting System. 

2. Recording and Observation

The Bookmakers’ Betting Rules of Racing Victoria Limited ("Racing Victoria") require that all telephone calls made to the Bookmakers’ telephone system be recorded and are able to be observed by Racing Victoria. 

Accordingly, you must consent to any of Racing Victoria and its contractors for the Purposes of: 

listening to (whether with or without an audible tone) and recording (and installing and using Data Surveillance Devices and Listening Devices in order to do so); and communicating and publishing any record or report created or information obtained as a result of listening to and recording, any communications passing between the Bookmaker and you. 

If opening an account with the Bookmaker to enable you to use the Telephone Betting System, you must warrant that you will allow no one else (whether as your agent or otherwise) to use your membership details or to use your account with the Bookmaker to place bets or otherwise transact using the Telephone Betting System. 

3. Age and Problem Gambling

It is illegal for persons under the age of 18 to place a bet using the Telephone System. 

The Bookmaker promotes responsible gambling. If gambling is a problem for you, visit the Responsible Gambling link on this site, visit www.problemgambling.vic.gov.au or free call 1800 156 789. 

You are also able to set betting limits and exclude yourself from placing a bet using the Telephone Betting System. If you set a betting limit, the Bookmaker will not accept bets over this limit. 

If you exclude yourself from betting the Bookmaker will set your available betting limit to zero and will not accept bets from you until the Bookmaker receives new instructions from you. Your account may not be re-opened for a period of 7 days.  

4. Privacy Statement

This Privacy Statement explains how Personal Information may be collected through this Website and how Personal Information collected here will be handled. 

What is "Personal Information"? 

“Personal Information” means information or an opinion, in any form and whether true or not, about an individual whose identity is apparent, or can reasonably be ascertained from, that information or opinion. It includes information such as your name, address, date of birth and phone number and may include items of User Data. 

Who collects Personal Information through the Website? 

Personal Information collected through this Website is collected by the Bookmaker. 

When is Personal Information collected through the Website? 

Personal Information is collected on this Website only when you choose to provide it for the purpose of: 

becoming a member of this Website; 
opening an account with the Bookmaker to enable you to use the Telephone Betting System. 

If you do not provide the Bookmaker with the requested Personal Information, you will not be able to open a telephone betting account with the Bookmaker. 

For what purposes is the Personal Information collected? 

The Bookmaker collects Personal Information for the purposes of: 

compliance with the rules of operating the Telephone Betting System and managing the accounts of account members with the Bookmaker; and 
providing Personal Information to Racing Victoria and its contractors for any of the Purposes. 
How is Personal Information disclosed by the Bookmaker and Racing Victoria? 

After its initial collection, the Bookmaker may disclose the information to Racing Victoria for the purposes outlined above. This may include disclosure by the Bookmaker to Racing Victoria pursuant to Racing Victoria's Bookmaker's Telephone Betting Rules 2001, and then by Racing Victoria to any of the bodies specified in s91E of the Racing Act 1958 (Vic), including Harness Racing Victoria, Greyhound Racing Victoria, the Victoria Police, the Bookmakers and Bookmaker's Clerks Registration Committee and any other person or body specified by the Minister under that section. Your Personal Information may also be disclosed to the Bookmaker's or Racing Victoria's contractors and agents (such as information technology providers, marketing and communications agencies, call centres, direct mail houses and printers) for the purposes outlined in this Privacy Statement. 

Security 

The Bookmaker will store your Personal Information either electronically or manually and will take reasonable steps to protect your Personal Information against misuse, loss and unauthorised access, use, modification or disclosure. 

While the Bookmaker strives to protect the Personal Information and privacy of users of the Website, it cannot guarantee the security of any information that you disclose online, and you disclose that information at your own risk. If you are concerned about security when transmitting data over the Internet you may contact the Bookmaker by: 

emailing admin@picnicbet.com 
Queries and Access 

Please contact the Bookmaker on admin@picnicbet.com if you would like to access the Personal Information that is held by the Bookmaker about you. 

Please contact Racing Victoria if you would like to access the Personal Information that is held by Racing Victoria about you. 

You will generally be provided with access to your Personal Information (although a fee may be imposed). 

Definitions 

Definitions used in these terms and conditions are set out below: 

"Data Surveillance Device" means any device capable of being used to record or monitor the input of information into or the output of information from any electronic device for storing or processing information. 

"Telephone Betting System" is the system approved by the Minister pursuant to section 86A of the Racing Act 1958 and operated by Racing Victoria. 

"Listening Device" is any device capable of being used to overhear, record, monitor or listen to a conversation or words spoken to or by any person in conversation. 

"Purposes" means any of: 

Racing Victoria's betting supervisory, management and regulatory functions (which may require the disclosure of User Data and information obtained by the use of any of Listening Devices and Data Surveillance Devices by Racing Victoria to enforcement bodies, State Government licensing authorities and racing control bodies in the States and Territories of Australia); and 
the provision by Racing Victoria to the Bookmaker of services relating to any of the Telephone Betting System. 
"User Data" is any data, information or other material which:

is entered into the the Website by you; or 
is otherwise held by the Bookmaker concerning or in relation to you, 
including records of transactions made by you using the Telephone Betting System or otherwise through the Website.

"Website" means the Bookmaker's website at www.picnicbet.com 
</textarea></td>
          </tr>
              <tr>
                <td colspan="4" bgcolor="#CCCCCC"> </td>
          </tr>
              <tr>
                <td width="199" bgcolor="#CCCCCC">I have read and understood the Terms & Conditions and hereby agree to them.<span class="style10">*</span></td>
                <td width="22" bgcolor="#CCCCCC"><input name="checkbox2" type="checkbox" value="checkbox" /></td>
                <td width="88" bgcolor="#CCCCCC"><input type="submit" name="Submit" value="Agree & Submit" /></td>
                <td width="295" bgcolor="#CCCCCC"><input type="reset" name="Submit2" value="Cancel" /></td>
              </tr>

</form>
</table>

<!-- InstanceEndEditable -->
<td width="10"><img src="mm_spacer.gif" alt="" width="10" height="1" border="0" /></td>
    <td width="136" valign="top"><a href="PeterBon.html"><img src="Assets/peterbonbetting.gif" width="136" height="600" border="0" /></a><br /></td>
 <td width="10"><img src="mm_spacer.gif" alt="" width="10" height="1" border="0" /></td>
   
  <tr>
    <td width="168"> </td>
    <td width="20"> </td>
    <td width="423"> </td>
    <td width="236"> </td>
    <td width="10"> </td>
    <td width="136"> </td>
<td width="10"> </td>
  </tr>
</table>
<table id="siteInfo" width="1001">
<tr><td height="22" id="siteInfo"> 
   <div align="center"><a href="#"></a><a href="PicnicContactUs.html">About-Contact Us</a> | <a href="http://www.problemgambling.vic.gov.au" target="_blank">Responsible Gambling</a> l <a href="link.php">Link Partner</a> </div></td></tr>
</table>
</body>
<!-- InstanceEnd --></html> 
<?
}
?>

try this code it should work

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/PicnicRacing.dwt" codeOutsideHTMLIsLocked="false" -->
<!-- DW6 -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>New Phone Account</title>
<!-- InstanceEndEditable --> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="description" content="Guide to Picnic Racing & Picnic Races provides a wide range of information on Victorian Picnic Racing events. Picnic Race clubs cater for all the needs of the Picnic Racing patron in a relaxed family friendly racing environment. Full picnic race & metropolitan betting facilities are available with either Bookmakers or on-course picnic racing totes."/> <meta name="keywords" content="picnic races, picnic racing, picnicbet.com, picnicbet.com.au, horse racing, melbourne cup, betting, bookmaker, picnic, derby day, peter bon, woolamai picnic races, healesville picnic races, balnarring picnic races, yea picnic races, alexandra picnic races, dederang picnic races, merton picnic races, mansfield picnic races, colac picnic races, pakenham picnic races, buchan picnic races, swifts creek picnic races, tambo valley picnic races, omeo picnic races, drouin picnic races"/> <meta name="robots" content="index,follow" />
<meta name="verify-v1" content="D/2Tm//JFW7N5ihRIJmSuTRZ2T4ZQvswrMSgAE3zL/w=" />
<link rel="stylesheet" href="mm_picnic.css" type="text/css" />
<script language="JavaScript" type="text/javascript">
//--------------- LOCALIZEABLE GLOBALS ---------------
var d=new Date();
var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
//Ensure correct for language. English is "January 1, 2004"
var TODAY = monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();
//---------------   END LOCALIZEABLE   ---------------
</script>
<style type="text/css">
<!--
.style3 {color: #016B18}
.style5 {color: #FFFFFF; font-size: large; }
.style10 {color: #FF0000}
-->
</style>
<script type="text/javascript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<!-- InstanceBeginEditable name="head" -->
<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
//-->
</script>
<!-- InstanceEndEditable -->
</head>
<body bgcolor="#C0DFFD">
<table width="1003" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="6" rowspan="2"><a href="index.html"><img src="Assets/PicnicPunters.gif" alt="Punter's Guide to Picnic Racing Home" width="167" height="112" border="0" /></a><img src="Assets/woolamai.jpg" width="412" height="112" /><img src="Assets/woolamaiflip.jpg" width="412" height="112" /></td>
 <td width="10"><img src="mm_spacer.gif" alt="" width="10" height="0" border="0" /></td>
  </tr>
  <tr bgcolor="#3366CC"></tr>
  <tr >
  	<td height="30" bgcolor="#387C2B" id="dateformat">  
    <script language="JavaScript" type="text/javascript">
      document.write(TODAY);</script></td>
<td colspan="2
" bgcolor="#8AB92D" id="tagline"><!-- InstanceBeginEditable name="EditRegion2" -->
  <div align="left"><span class="style5">PicnicBet.com - New  Phone Account </span></div>
<!-- InstanceEndEditable --></td>   
    <td colspan="3
" bgcolor="#8AB92D" id="tagline"><div align="right"><span class="style3">Picnic Bookies</span> <span class="style10">Always a Better Bet !</span> </div></td>
  </tr>
<tr>
    <td colspan="6" bgcolor="#003366"></td>
  </tr>

<tr>
    <td width="168" valign="top" bgcolor="#89B92D">
<table border="0" cellspacing="0" cellpadding="0" width="168" id="navigation">
        <tr>
          <td width="168" >
<!-- Google CSE Search Box Begins  -->
<form action="http://www.picnicracing.com.au/searchresults.html" id="searchbox_000078263159025743370:pts-tnrhqr8">
  <input type="hidden" name="cx" value="000078263159025743370:pts-tnrhqr8" />
  <input type="hidden" name="cof" value="FORID:9" />
  <br />
  <input type="text" name="q" size="16" />
  <input type="submit" name="sa" value="Go" />
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_000078263159025743370%3Apts-tnrhqr8"></script>
<!-- Google CSE Search Box Ends --></td>
        </tr>
        <tr>
          <td width="168" align="left" valign="middle"><a href="index.html" class="navText">Latest News </a></td>
        </tr>
	<tr>
          <td width="168" align="left" valign="middle"><a href="News07/PastNews20072008Season.html" class="navText">Past News </a></td>
        </tr>
	<tr>
         <td width="168"><a href="http://www.picnicracing.com.au/picniclist/?p=subscribe&id=1" target="_blank" class="navText"> Subscribe to News </a></td>
        </tr>
        <tr>
          <td width="168"><a href="AboutPicnicRacing.html" class="navText">About Picnic Racing</a></td>
        </tr>
        <tr>
          <td width="168"><a href="PicnicCalendar.html" class="navText">Picnic Calendar</a></td>
        </tr>
	<!--<tr>
          <td width="168"><a href="http://www.picnicracing.com.au/~picnicra/phpBB/phpBB2/" target="_blank" class="navText">Picnic Forum</a></td>
        </tr>-->
        <tr>
          <td width="168"><a href="PicnicTracks.html" class="navText">Picnic Racetracks</a></td>
        </tr>
        <tr>
          <td width="168"><a href="PicnicFormguides.html" class="navText">Picnic Formguides</a></td>
        </tr>
          <!--<tr>
	  <td width="168"><a href="http://www.picnicracing.com.au/classified_lite_v204/index.php" target="_blank" class="navText">Free Picnic Classifieds</a></td>
        </tr>-->
	<tr>
          <td width="168"><a href="PeterBon.html" class="navText">The Betting Ring</a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicJockeys.html" class="navText">Picnic Jockeys</a></td>
        </tr>
	<!--<tr>
          <td width="168"><a href="../PicnicTrainers.html" class="navText">Picnic Trainers</a></td>
        </tr>-->
	<tr>
          <td width="168"><a href="PicnicCups.html" class="navText">Picnic Cup Video Clips </a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicRaceResults.html" class="navText">Picnic Race Results </a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicStats/Jockey20072008.html" class="navText">Picnic Jockeys Results </a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicStats/Trainer20072008.html" class="navText">Picnic Trainer Results</a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicStats/Horse20072008.html" class="navText">Picnic Horse Results </a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicRaceConditions.html">Picnic Race Conditions</a></td>
        </tr>
	<tr>
          <td width="168"><a href="http://picnicracing.com.au/gallery/" target="_blank">Picture Gallery</a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicFAQ.html" class="navText">FAQs</a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicWeather.html" class="navText">Weather Forecasts</a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicContactUs.html" class="navText">About-Contact Us</a></td>
        </tr>
	<tr>
          <td width="168"><a href="PicnicLinks.html" class="navText">Links</a></td>
        </tr>
      </table>
<br />
  	 <br />
  	 <br />
  	 <br />
    <td width="20"><img src="mm_spacer.gif" alt="" width="20" height="1" border="0" /></td>
    <td colspan="2" valign="top"><img src="mm_spacer.gif" alt="" width="305" height="1" border="0" /><br />

<!-- InstanceBeginEditable name="EditRegion1" -->
<table border="0" cellspacing="0" cellpadding="0" width="659">
      <tr>
        <td colspan="5" class="pageName"> </td>
      </tr>
      <tr>
        <td width="252" bordercolor="#000000" bgcolor="#000000" class="bodyText"><div align="center" class="style10"><a href="PeterBon2.html" class="style10"><strong>		Home to PicnicBet.com </strong></a> </div></td>
        <td width="173" bgcolor="#000000" class="bodyText"><div align="center" class="style10"><a href="PeterBonBanking.html" class="style10"><strong>Banking Info</strong></a> </div></td>
        <td width="133" bgcolor="#000000" class="bodyText"><div align="center" class="style10"><a href="PeterBonFAQ.html" class="style10"><strong>FAQs</strong></a></div></td>
        <td width="101" bgcolor="#000000" class="bodyText"><div align="center" class="style10"><a href="PeterBonContact.html" class="style10"><strong>Contact Us</strong></a> </div></td>
      </tr>
      
      <tr>
       <td colspan="4" class="bodyText"><p><br />
        Fill in and submit the form below to create a Telephone Betting Account. Once complete, go to the <a href="PeterBonBanking.html">Banking Info</a> section to deposit funds into your account. <br />
        Fields marked with a <span class="style10">*</span> are mandatory. </p>       </td>
      </tr>
    </table>

<?php

//check if the submit button has been pressed. 
$submit = $_GET['submit'];  

//if the submit button has been pressed, send the email
if ($submit == 'true')
{

require_once "Mail.php";

$from = $_POST[Email];
$subject = $_POST[txtSubject];
$content = "Title: " .$_POST[txtTitle]. "\r\n";
$content .= "FirstName: " .$_POST[FirstName]. "\r\n";
$content .= "LastName: " .$_POST[LastName]. "\r\n";
$content .= "Date of Birth: " .$_POST[txtDay];
$content .= "/" .$_POST[txtMonth];
$content .= "/" .$_POST[txtYear]. "\r\n";
$content .= "Drivers Lic/Passport Number: " .$_POST[txtDrivers]. "\r\n";
$content .= "Main Contact Number: " .$_POST[MainContactNumber]. "\r\n";
$content .= "Business Number: " .$_POST[txtBusiness]. "\r\n";
$content .= "Mobile Number: " .$_POST[txtMobile]. "\r\n";
$content .= "Street Address: " .$_POST[streetAddress]. "\r\n";
$content .= "Suburb: " .$_POST[suburb]. "\r\n";
$content .= "City: " .$_POST[txtCity]. "\r\n";
$content .= "State: " .$_POST[state]. "\r\n";
$content .= "Postcode: " .$_POST[Postcode]. "\r\n";
$content .= "Country: " .$_POST[Country]. "\r\n";
$content .= "Mailing Street Address: " .$_POST[txtMailStreetAddress]. "\r\n";
$content .= "Mailing Suburb: " .$_POST[txtMailSuburb]. "\r\n";
$content .= "Mailing City: " .$_POST[txtMailCity]. "\r\n";
$content .= "Mailing State: " .$_POST[txtMailState]. "\r\n";
$content .= "Mailing Postcode: " .$_POST[txtMailPostcode]. "\r\n";
$content .= "Mailing Country: " .$_POST[txtMailCountry]. "\r\n";
$content .= "Account Type: " .$_POST[txtAccounts]. "\r\n";


$to = "admin@picnicbet.com";     // this is the email address to send the form results to

$host = "localhost";
$username = "";      // replace with your email address hosted by MD Webhosting
$password = "";                 // replace with the password for your email address 

$headers = array ('From' => $from,
   'To' => $to,
   'Subject' => $subject);

$smtp = Mail::factory('smtp',
   array ('host' => $host,
     'auth' => true,
     'username' => $username,
     'password' => $password));

$mail = $smtp->send($to, $headers, $content); 

if (PEAR::isError($mail)) {
   echo("<p>" . $mail->getMessage() . "</p>");
  } else {
  "<a href='PeterBonConfirmation.html'></a>";
  }

}

// if the submit button has not been pressed, display the email form

else 

{ 
?>
<table width="653" border="0">
  <form action="mail.php?submit=true" method="post">
<tr>
    <td width="199" bgcolor="#C0DFFD"><strong>CUSTOMER DETAILS </strong></td>
</tr>

<tr>
    <td colspan="2" bgcolor="#CCCCCC" width="45"><input type="hidden" name="txtSubject" value="New Account"></td>
</tr>
<tr>
     <td colspan="2" bgcolor="#CCCCCC"><label>Title</label></td>
     <td width="395" colspan="2" bgcolor="#CCCCCC"><select name="txtTitle">
         <option>Mr</option>
         <option>Mrs</option>
         <option>Ms</option>
         <option>Miss</option>
     </select></td>
</tr> 
<tr>
      <td colspan="2" bgcolor="#CCCCCC">First Name<span class="style10">*</span> </td>
      <td colspan="2" bgcolor="#CCCCCC"><input name="FirstName" type="text" /></td>
</tr>
<tr>
      <td colspan="2" bgcolor="#CCCCCC">Last Name<span class="style10">*</span> </td>
      <td colspan="2" bgcolor="#CCCCCC"><input name="LastName" type="text" /></td>
</tr> 
<tr>
                <td colspan="2" bgcolor="#CCCCCC">Date of Birth<span class="style10">*</span> (Must be 18yo or over) </td>
                <td colspan="2" bgcolor="#CCCCCC"><select name="txtDay">
                  <option>01</option>
                  <option>02</option>
                  <option>03</option>
                  <option>04</option>
                  <option>05</option>
                  <option>06</option>
                  <option>07</option>
                  <option>08</option>
                  <option>09</option>
                  <option>10</option>
                  <option>11</option>
                  <option>12</option>
                  <option>13</option>
                  <option>14</option>
                  <option>15</option>
                  <option>16</option>
                  <option>17</option>
                  <option>18</option>
                  <option>19</option>
                  <option>20</option>
                  <option>21</option>
                  <option>22</option>
                  <option>23</option>
                  <option>24</option>
                  <option>25</option>
                  <option>26</option>
                  <option>27</option>
                  <option>28</option>
                  <option>29</option>
                  <option>30</option>
                  <option>31</option>
                </select>
                 / 
                 <select name="txtMonth">
                   <option>01</option>
                   <option>02</option>
                   <option>03</option>
                   <option>04</option>
                   <option>05</option>
                   <option>06</option>
                   <option>07</option>
                   <option>08</option>
                   <option>09</option>
                   <option>10</option>
                   <option>11</option>
                   <option>12</option>
                 </select>
                  / 
                  <select name="txtYear">
                    <option>2000</option>
                    <option>1999</option>
                    <option>1998</option>
                    <option>1997</option>
                    <option>1996</option>
                    <option>1995</option>
                    <option>1994</option>
                    <option>1993</option>
                    <option>1992</option>
                    <option>1991</option>
                    <option>1990</option>
                    <option>1989</option>
                    <option>1988</option>
                    <option>1987</option>
                    <option>1986</option>
                    <option>1985</option>
                    <option>1984</option>
                    <option>1983</option>
                    <option>1982</option>
                    <option>1981</option>
                    <option>1980</option>
                    <option>1979</option>
                    <option>1978</option>
                    <option>1977</option>
                    <option>1976</option>
                    <option>1975</option>
                    <option>1974</option>
                    <option>1973</option>
                    <option>1972</option>
                    <option>1971</option>
                    <option>1970</option>
                    <option>1969</option>
                    <option>1968</option>
                    <option>1967</option>
                    <option>1966</option>
                    <option>1965</option>
                    <option>1964</option>
                    <option>1963</option>
                    <option>1962</option>
                    <option>1961</option>
                    <option>1960</option>
                    <option>1959</option>
                    <option>1958</option>
                    <option>1957</option>
                    <option>1956</option>
                    <option>1955</option>
                    <option>1954</option>
                    <option>1953</option>
                    <option>1952</option>
                    <option>1951</option>
                    <option>1950</option>
                    <option>1949</option>
                    <option>1948</option>
                    <option>1947</option>
                    <option>1946</option>
                    <option>1945</option>
                    <option>1944</option>
                    <option>1943</option>
                    <option>1942</option>
                    <option>1941</option>
                    <option>1940</option>
                    <option>1939</option>
                    <option>1938</option>
                    <option>1937</option>
                    <option>1936</option>
                    <option>1935</option>
                    <option>1934</option>
                    <option>1933</option>
                    <option>1932</option>
                    <option>1931</option>
                    <option>1930</option>
                    <option>1929</option>
                    <option>1928</option>
                    <option>1927</option>
                    <option>1926</option>
                    <option>1925</option>
                    <option>1924</option>
                    <option>1923</option>
                    <option>1922</option>
                    <option>1921</option>
                    <option>1920</option>
                    <option>1919</option>
                    <option>1918</option>
                    <option>1917</option>
                    <option>1916</option>
                    <option>1915</option>
                    <option>1914</option>
                    <option>1913</option>
                    <option>1912</option>
                    <option>1911</option>
                    <option>1910</option>
                    <option>1909</option>
                    <option>1908</option>
                    <option>1907</option>
                    <option>1906</option>
                    <option>1905</option>
                    <option>1904</option>
                    <option>1903</option>
                    <option>1902</option>
                    <option>1901</option>
                    <option>1900</option>
                  </select>                  </td>
          </tr>
		  <tr>
    <td colspan="2" bgcolor="#CCCCCC">Your Email Address<span class="style10">*</span> </td>
<td colspan="2" bgcolor="#CCCCCC"><input name="Email" type="text" /></td>
</tr>
		  <tr>
                <td colspan="2" bgcolor="#CCCCCC">Drivers Lic / Passport Number</td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtDrivers" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Main Contact Number<span class="style10">*</span> </td>
                <td colspan="2" bgcolor="#CCCCCC"><input name="MainContactNumber" type="text" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">and/or Business Number</td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtBusiness" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Mobile Number</td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtMobile" /></td>
              </tr>
              <tr>
                <td colspan="4" bgcolor="#C0DFFD"><strong><br />
                  RESIDENTIAL ADDRESS </strong></td>
              </tr>
		  <tr>
                <td colspan="2" bgcolor="#CCCCCC">Street Address<span class="style10">*</span></td>
                <td colspan="2" bgcolor="#CCCCCC"><input name="StreetAddress" type="text" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Suburb<span class="style10">*</span></td>
                <td colspan="2" bgcolor="#CCCCCC"><input name="Suburb" type="text" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">City</td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtCity" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">State/Province<span class="style10">*</span></td>
                <td colspan="2" bgcolor="#CCCCCC"><input name="State" type="text" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Postcode/Zip<span class="style10">*</span></td>
                <td colspan="2" bgcolor="#CCCCCC"><input name="Postcode" type="text" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Country<span class="style10">*</span></td>
                <td colspan="2" bgcolor="#CCCCCC"><input name="Country" type="text" /></td>
              </tr>
		  <tr>
                <td colspan="4" bgcolor="#C0DFFD"><strong><br />
                  MAILING ADDRESS</strong> </td>
          </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Same as Above </td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="checkbox" name="checkbox" value="checkbox" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Street Address </td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtMailStreetAddress" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Suburb</td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtMailSuburb" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">City</td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtMailCity" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">State/Province</td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtMailState" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Postcode/Zip</td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtMailPostcode" /></td>
              </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Country</td>
                <td colspan="2" bgcolor="#CCCCCC"><input type="text" name="txtMailCountry" /></td>
              </tr>
		  
		  <tr>
                <td colspan="4" bgcolor="#C0DFFD"><strong><br />
                  ACCOUNT SETTINGS</strong> </td>
          </tr>
              <tr>
                <td colspan="2" bgcolor="#CCCCCC">Statements & Frequency </td>
                <td colspan="2" bgcolor="#CCCCCC"><select name="txtAccounts">
                  <option>Monthly Statement by Email</option>
                  <option>Monthly Printed Statement by Mail</option>
                </select>                </td>
              </tr>
              <tr>
                <td colspan="4" bgcolor="#C0DFFD"><strong><br />
                  TERMS & CONDITIONS</strong> </td>
          </tr>
              <tr>
                <td height="53" colspan="4" bgcolor="#CCCCCC"><textarea name="textarea" cols="70" rows="10">Terms and Conditions

1. Acceptance

To enable you to place bets you need to read and understand the following Terms & Conditions and Privacy Statement and accept those Terms & Conditions and Privacy Statement (by clicking "I Accept and Submit" at the end of the Terms & Conditions and Privacy Statement). If you do not accept the Terms & Conditions and Privacy Statement, you will not be able to place bets using the Telephone Betting System. 

2. Recording and Observation

The Bookmakers’ Betting Rules of Racing Victoria Limited ("Racing Victoria") require that all telephone calls made to the Bookmakers’ telephone system be recorded and are able to be observed by Racing Victoria. 

Accordingly, you must consent to any of Racing Victoria and its contractors for the Purposes of: 

listening to (whether with or without an audible tone) and recording (and installing and using Data Surveillance Devices and Listening Devices in order to do so); and communicating and publishing any record or report created or information obtained as a result of listening to and recording, any communications passing between the Bookmaker and you. 

If opening an account with the Bookmaker to enable you to use the Telephone Betting System, you must warrant that you will allow no one else (whether as your agent or otherwise) to use your membership details or to use your account with the Bookmaker to place bets or otherwise transact using the Telephone Betting System. 

3. Age and Problem Gambling

It is illegal for persons under the age of 18 to place a bet using the Telephone System. 

The Bookmaker promotes responsible gambling. If gambling is a problem for you, visit the Responsible Gambling link on this site, visit www.problemgambling.vic.gov.au or free call 1800 156 789. 

You are also able to set betting limits and exclude yourself from placing a bet using the Telephone Betting System. If you set a betting limit, the Bookmaker will not accept bets over this limit. 

If you exclude yourself from betting the Bookmaker will set your available betting limit to zero and will not accept bets from you until the Bookmaker receives new instructions from you. Your account may not be re-opened for a period of 7 days.  

4. Privacy Statement

This Privacy Statement explains how Personal Information may be collected through this Website and how Personal Information collected here will be handled. 

What is "Personal Information"? 

“Personal Information” means information or an opinion, in any form and whether true or not, about an individual whose identity is apparent, or can reasonably be ascertained from, that information or opinion. It includes information such as your name, address, date of birth and phone number and may include items of User Data. 

Who collects Personal Information through the Website? 

Personal Information collected through this Website is collected by the Bookmaker. 

When is Personal Information collected through the Website? 

Personal Information is collected on this Website only when you choose to provide it for the purpose of: 

becoming a member of this Website; 
opening an account with the Bookmaker to enable you to use the Telephone Betting System. 

If you do not provide the Bookmaker with the requested Personal Information, you will not be able to open a telephone betting account with the Bookmaker. 

For what purposes is the Personal Information collected? 

The Bookmaker collects Personal Information for the purposes of: 

compliance with the rules of operating the Telephone Betting System and managing the accounts of account members with the Bookmaker; and 
providing Personal Information to Racing Victoria and its contractors for any of the Purposes. 
How is Personal Information disclosed by the Bookmaker and Racing Victoria? 

After its initial collection, the Bookmaker may disclose the information to Racing Victoria for the purposes outlined above. This may include disclosure by the Bookmaker to Racing Victoria pursuant to Racing Victoria's Bookmaker's Telephone Betting Rules 2001, and then by Racing Victoria to any of the bodies specified in s91E of the Racing Act 1958 (Vic), including Harness Racing Victoria, Greyhound Racing Victoria, the Victoria Police, the Bookmakers and Bookmaker's Clerks Registration Committee and any other person or body specified by the Minister under that section. Your Personal Information may also be disclosed to the Bookmaker's or Racing Victoria's contractors and agents (such as information technology providers, marketing and communications agencies, call centres, direct mail houses and printers) for the purposes outlined in this Privacy Statement. 

Security 

The Bookmaker will store your Personal Information either electronically or manually and will take reasonable steps to protect your Personal Information against misuse, loss and unauthorised access, use, modification or disclosure. 

While the Bookmaker strives to protect the Personal Information and privacy of users of the Website, it cannot guarantee the security of any information that you disclose online, and you disclose that information at your own risk. If you are concerned about security when transmitting data over the Internet you may contact the Bookmaker by: 

emailing admin@picnicbet.com 
Queries and Access 

Please contact the Bookmaker on admin@picnicbet.com if you would like to access the Personal Information that is held by the Bookmaker about you. 

Please contact Racing Victoria if you would like to access the Personal Information that is held by Racing Victoria about you. 

You will generally be provided with access to your Personal Information (although a fee may be imposed). 

Definitions 

Definitions used in these terms and conditions are set out below: 

"Data Surveillance Device" means any device capable of being used to record or monitor the input of information into or the output of information from any electronic device for storing or processing information. 

"Telephone Betting System" is the system approved by the Minister pursuant to section 86A of the Racing Act 1958 and operated by Racing Victoria. 

"Listening Device" is any device capable of being used to overhear, record, monitor or listen to a conversation or words spoken to or by any person in conversation. 

"Purposes" means any of: 

Racing Victoria's betting supervisory, management and regulatory functions (which may require the disclosure of User Data and information obtained by the use of any of Listening Devices and Data Surveillance Devices by Racing Victoria to enforcement bodies, State Government licensing authorities and racing control bodies in the States and Territories of Australia); and 
the provision by Racing Victoria to the Bookmaker of services relating to any of the Telephone Betting System. 
"User Data" is any data, information or other material which:

is entered into the the Website by you; or 
is otherwise held by the Bookmaker concerning or in relation to you, 
including records of transactions made by you using the Telephone Betting System or otherwise through the Website.

"Website" means the Bookmaker's website at www.picnicbet.com 
</textarea></td>
          </tr>
              <tr>
                <td colspan="4" bgcolor="#CCCCCC"> </td>
          </tr>
              <tr>
                <td width="199" bgcolor="#CCCCCC">I have read and understood the Terms & Conditions and hereby agree to them.<span class="style10">*</span></td>
                <td width="22" bgcolor="#CCCCCC"><input name="checkbox2" type="checkbox" value="checkbox" /></td>
                <td width="88" bgcolor="#CCCCCC"><input type="submit" name="Submit" value="Agree & Submit" /></td>
                <td width="295" bgcolor="#CCCCCC"><input type="reset" name="Submit2" value="Cancel" /></td>
              </tr>

</form>
</table>

<?
}
?>
<!-- InstanceEndEditable -->
<td width="10"><img src="mm_spacer.gif" alt="" width="10" height="1" border="0" /></td>
    <td width="136" valign="top"><a href="PeterBon.html"><img src="Assets/peterbonbetting.gif" width="136" height="600" border="0" /></a><br /></td>
 <td width="10"><img src="mm_spacer.gif" alt="" width="10" height="1" border="0" /></td>
   
  <tr>
    <td width="168"> </td>
    <td width="20"> </td>
    <td width="423"> </td>
    <td width="236"> </td>
    <td width="10"> </td>
    <td width="136"> </td>
<td width="10"> </td>
  </tr>
</table>
<table id="siteInfo" width="1001">
<tr><td height="22" id="siteInfo"> 
   <div align="center"><a href="#"></a><a href="PicnicContactUs.html">About-Contact Us</a> | <a href="http://www.problemgambling.vic.gov.au" target="_blank">Responsible Gambling</a> l <a href="link.php">Link Partner</a> </div></td></tr>
</table>
</body>
<!-- InstanceEnd --></html> 

 

 

 

Minase, that seems to have done the trick. As best as I can see you have shifted:

 

<?

}

?>

 

from the bottom of the file up into the code. Is that correct or were there some other changes ?

 

Thankyou to yourself and Adam for assistance, very much appreciated.

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.