GetDotted Domains

Viewing Thread:
"php help please... Total n00b here"

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.

Fri 26/11/04 at 21:11
Regular
"l33t cs50r"
Posts: 2,956
http://blagrovefleet.users.digital-crocus.com/testform.php

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
Sat 27/11/04 at 19:43
Regular
"l33t cs50r"
Posts: 2,956
back already...

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";
Sat 27/11/04 at 19:17
Regular
"l33t cs50r"
Posts: 2,956
cjh wrote:
> 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!;)
Sat 27/11/04 at 13:26
Regular
"NULL"
Posts: 1,384
Garin wrote:
> 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.
Sat 27/11/04 at 12:37
Regular
"It goes so quickly"
Posts: 4,083
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";
}
Sat 27/11/04 at 12:30
Regular
"Devil in disguise"
Posts: 3,151
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.
Sat 27/11/04 at 11:15
Regular
"NULL"
Posts: 1,384
I would agree with most of that. I've just rekindled one of my old projects - a hit counter. I can track all manner of user information, just without using server logs - it's designed so that anyone can sign up for it and just add a few lines of HTML to their site to get it working.
Sat 27/11/04 at 10:07
Moderator
"Are you sure?"
Posts: 5,000
You never like anything I say - but here goes...

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...
Sat 27/11/04 at 00:42
Regular
"l33t cs50r"
Posts: 2,956
Garin wrote:
> 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.
Sat 27/11/04 at 00:17
Regular
"Devil in disguise"
Posts: 3,151
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.
Sat 27/11/04 at 00:12
Regular
"NULL"
Posts: 1,384
Just direct that form to a page containing the php code i gave you.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Thank you very much for your help!
Top service for free - excellent - thank you very much for your help.
Top-notch internet service
Excellent internet service and customer service. Top-notch in replying to my comments.
Duncan

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.