Jump to content

[SOLVED] variables problem not being sent


ldoozer

Recommended Posts

Please could someone shed some light on this its driving me mad.

The following is sposed to send a order form to an email address but when i get the email it has all the field titles in it but no data?

 

<form action="formmail.php" method="post" name="BuyForm"> 
		<input type="hidden" name="instId"  value="120597"> 
		<input type="hidden" name="cartId"  value="GTG">
		<input type="hidden" name="currency"  value="GBP"> 
		<input type="hidden" name="desc"  value="order">
		<input type="hidden" name="amount"  value="0">
		<input type="hidden" name="testMode"  value="100">
		<table border="0" cellpadding="0" cellspacing="3">
				<tr> 
					<td colspan="2"><h1><strong>Your details</strong></h1></td>
				</tr>
				<tr> 
					<td width="107">Name</td>
					<td width="147"><input name="MC_Name" type="text" size="30"></td>
				</tr>
				<tr> 
					<td align="left" valign="top">Address</td>
					<td><textarea name="MC_Address" cols="30" rows="3" wrap="VIRTUAL"></textarea></td>
				</tr>
				<tr> 
					<td>Postcode</td>
					<td><input name="MC_Code" type="text" size="8" maxlength="8"></td>
				</tr>
			  <tr> 
				<td>E Mail</td>
				<td><input name="MC_Email" type="text" size="30"></td>
			  </tr>
			  <tr>
			    <td>Phone number </td>
			    <td><input name="MC_Phone" type="text" id="MC_Phone" size="30" /></td>
	      </tr>
			  <tr> 
				<td>Where to plant</td>
				<td><select name="MC_Location">
				  <option value="Any">Any</option>
				  <option value="Barnsley">Barnsley</option>
				  <option value="Doncaster">Doncaster</option>
				  <option value="Rotherham">Rotherham</option>
				  <option value="Sheffield">Sheffield</option>
				  </select></td>
			  </tr>
			  <tr> 
				<td align="left" valign="top">Message on certificate </td>
				<td><textarea name="MC_Message" cols="30" rows="5" wrap="VIRTUAL"></textarea></td>
			  </tr>
			  <tr> 
				<td colspan="2"><h1><strong>If gift, who will receive it</strong></h1></td>
			  </tr>
				<tr> 
					<td>Name</td>
					<td><input name="MC_Gift_Name" type="text" size="30"></td>
				</tr>
				<tr> 
					<td>Address</td>
					<td><textarea name="MC_Gift_Address" cols="30" rows="3" wrap="VIRTUAL"></textarea></td>
				</tr>
				<tr> 
					<td>Postcode</td>
					<td><input name="MC_Gift_Code" type="text" size="8" maxlength="8"></td>
				</tr>
				<tr>
				  <td colspan="2"> </td>
		  </tr>
				<tr> 
					<td>Please select your payment method </td>
					<td><input name="method" type="radio" id="cheque" value="cheque" />
				    Cheque 
				    <input name="method" type="radio" id="worldpay" value="worldpay" />
				    Worldpay</td>
				</tr>
		</table>
		<p>The information you provide will be kept confidential, we will not share your details with any other organisation.</p>
		  <!-- This generates a button that submits the information and sends the user to the Worldpay payment pages. -->
		  <input type="submit" value="Buy Now" onclick="javascript:formCheck();">
		  
		</form>

 

<?php
$to = "someone@somwhere.com";
$message = "order: \r\n\r\nCustomer Name: ".$MC_Name."\r\nCustomer Address: ".$MC_Address."\r\nCustomer Postcode: ".$MC_Code."\r\nCustomer Email: ".$MC_Email."\r\nCustomer Phone: ".$MC_Phone."\r\nPlant in: ".$MC_Location."\r\nMessage on Certificate: ".$MC_Message."\r\nGift Name: ".$MC_Gift_Name."\r\nGift Address: ".$MC_Gift_Address."\r\nGift Postcode: ".$MC_Gift_Code."\r\nPayment Method: ".$method."\r\n\r\nEnd of order";
// 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";

mail($to, "Order", $message, "from: company@company.co.uk \r\n");
?> 

Link to comment
Share on other sites

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.