The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
Need to add an email function to this form to send a php generated email with all of the data from that form in it, structured how it is. It also need to capture the refering URL which bought you to this page in the first place.
This is a little over my head, and now quite urgent for me to sort... Like, by tomorrow!!!!
Any help welcome
Cheers
GOt this in my inbox, came in a pain text, not HTML? Any ideas?
MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1
Message-Id:
Sender: World Wide Web Owner
Date: Sat, 27 Nov 2004 19:40:10 +0000
X-Authenticated-Sender: www
X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on rabbit
X-Spam-Level:
X-Spam-Status: No, score=-101.0 required=10.0 tests=ALL_TRUSTED,HTML_40_50,
HTML_MESSAGE,HTML_TAG_BALANCE_BODY,
HTML_TITLE_EMPTY,MIME_HTML_ONLY,
NO_REAL_NAME,USER_IN_WHITELIST autolearn=ham version=3.0.1
X-NAS-Bayes: #0: 2.32709E-038; #1: 1
X-NAS-Classification: 0
X-NAS-MessageID: 357
X-NAS-Validation: {EDDD3415-4816-4793-AE81-0979C1059A07}
Referrer: unknown referrer
Personal Details
Title: Mr
First Name: Alan
Last Name: Tyla
Telephone Number: 012345678
Preferred Contact Day: Monday
Preferred Contact Time: 12:00-14:00
Company Details
Company Name: Digital-Prozac
Business/Occupation: Designer
No of Vehicles: 1-5
Cover Details
Existing Policy due for Renewal?: No
Date Day: 01
Date Month: Jan
Date Year: 2004
Additional Cover
Goods in Transit: Goods in Transit
Public/Employers Liability: Public/Employer
Other Commercial Insurance: Other Commercial
Does it have something to do with these not being in there?
$to = "[email protected]";
$subject = "My HTML email test.";
$headers = "From: [email protected]\r\n";
$headers .= "Reply-To: [email protected]\r\n";
$headers .= "Return-Path: [email protected]\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
> Would this be what you're after
> [URL]http://www.haignet.co.uk/tyla/index.php[/URL]??
>
> The Send to is there just to give you somewhere to test this
> out first to see if it meets your needs, the actual code
> ([URL]http://www.haignet.co.uk/tyla/index.txt[/URL]) doesn't have
> this, so you'd only have to go in and change the $addr
> variable.
>
> It doesn't contain any real validation, just replaces empty values
> with the 'not specified' text. The HTML email isn't formatted either,
> but I'm going to take a guess that you'll understand how it's set out
> and can change it as required.
>
> If it's not what you wanted, or it turns out not to work, just pop
> this thread and we'll see if we can help out.
>
> Just as a side note, if you were to use the code provided by Nimco,
> add the bolded part to protect from inputted HTML code.
>
> foreach ($_POST as $key =$value) {
> $message .= $key . ": " .
> htmlentities($value) . "\n";
> }
Excellent Dude... Humble thans!;)
Spot on, think I can work it out from there (just). Sure I'll be back if I get stuck!;)
> People get what they pay for, not necessarily the best solution. :-)
> Processing the referer logs might be a better solution, but its a
> fair amount of extra work.
There are advantages to both systems. Server logs don't let you use JavaScript to extract extra user info, but then methods using an image to call a remote script won't work on text-only browsers.
The Send to is there just to give you somewhere to test this out first to see if it meets your needs, the actual code ([URL]http://www.haignet.co.uk/tyla/index.txt[/URL]) doesn't have this, so you'd only have to go in and change the $addr variable.
It doesn't contain any real validation, just replaces empty values with the 'not specified' text. The HTML email isn't formatted either, but I'm going to take a guess that you'll understand how it's set out and can change it as required.
If it's not what you wanted, or it turns out not to work, just pop this thread and we'll see if we can help out.
Just as a side note, if you were to use the code provided by Nimco, add the bolded part to protect from inputted HTML code.
foreach ($_POST as $key => $value) {
$message .= $key . ": " . htmlentities($value) . "\n";
}
Processing the referer logs might be a better solution, but its a fair amount of extra work.
In my opinion the only effective way of measuring any sites search engine or clickthrough campaign is to use the data captured in the raw logs.
Perhaps you need to provide a friendly frontend to present the data.
Capturing the refer from your form won't be accurate.
Extracting data from the sites logs will show your client how many people came from google, etc. and then you can compare this to the number of people that use the form. Obviously you can follow their route through the site to see what the visitor is doing and if they exit without contacting.
For a campaign you can also setup a new form that's not available through the normal site navigation but only referenced by the advert. Add a reference to the generated email so that you can monitor it's effectiveness.
Ignore away...
> Tyla wrote:
> OK, couldn't get any of that to work...
>
>
> More information would help, did it compile ok, did it just not send
> the email? Are you testing it on the server, or trying to test it
> locally. Nimco's code should have got you some results.
Just a case of iver tired... been working straight for 47 hours now!! Time for bed I think and come back to it tomorrow.
> OK, couldn't get any of that to work...
>
More information would help, did it compile ok, did it just not send the email? Are you testing it on the server, or trying to test it locally. Nimco's code should have got you some results.