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
Tue 30/11/04 at 17:25
Regular
"l33t cs50r"
Posts: 2,956
Hmmm... wrote:
> 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...

Was hoping for a more simple approach than that.

Basically, my client uses various campaings such as Google ads and click throughs for the ranking fo their site. All the links are direct to relevant forms ie: Fleet insurance = FleetQuote.php, so there's not need to track their movement through the site, all ineed is the refering url for their entry point if it's one of those forms. Kind of like you last point, but without the additional forms.

Will be trawling Google and Oveture tonight to see what they recommend.
Sun 28/11/04 at 19:24
Regular
"It goes so quickly"
Posts: 4,083
Nice one, glad there wasn't too many hurdles to jump.

Yes, the same script should work for any form, with the required input and variables changed to suite.
Sun 28/11/04 at 16:42
Regular
"l33t cs50r"
Posts: 2,956
cjh wrote:
> Did you manage to get it working??
>
> Also, if you're interested, I uploaded a slightly changed version
> that will output better formed markup (I also forgot to uncomment out
> the closing
Finished version now looks like this: [URL]http://blagrovefleet.users.digital-crocus.com/fleetQuote.php[/URL]

code: [URL]http://digital-prozac.co.uk/fleetQuote.txt[/URL]

Fiddled a bit with the out put for the email for formatting, been a bit of a learning curve and have given up on the referer for now. Works a treat, quite impressed. Currently all the forms are the same, but will be changing this tonigh. I assume it's just a case fo amending the code here and there for the new/additional inputs.
Sun 28/11/04 at 10:28
Regular
"It goes so quickly"
Posts: 4,083
Did you manage to get it working??

Also, if you're interested, I uploaded a slightly changed version that will output better formed markup (I also forgot to uncomment out the closing tags in the original too).
Sun 28/11/04 at 09:05
Regular
"Eff, you see, kay?"
Posts: 14,156
The old CRLF problem heh.

function fixCrlf($str) {

// takes user input from Unix, Mac or Windows and converts linebreaks to a predictable format (\n).

$str = str_replace("\r\n", "\n", $str);
$str = str_replace("\r", "\n", $str);

return $str;
}
Sun 28/11/04 at 03:00
Regular
"NULL"
Posts: 1,384
The \r\n is to account for different servers/platforms which handle line breaks in different ways.
Sat 27/11/04 at 21:51
Regular
"l33t cs50r"
Posts: 2,956
Cheers again!
Sat 27/11/04 at 21:02
Regular
"Devil in disguise"
Posts: 3,151
Tyla wrote:
> $addr\r\nMIME-Version: 1.0\r\nContent-type:
>
> Which /r?

All of them. :)
Sat 27/11/04 at 20:51
Regular
"l33t cs50r"
Posts: 2,956
Garin wrote:
> This is from cjh's code
>
> # Send email and say thank you.
> if (! @mail("$addr", "$subject",
> "

Referrer > $referrer

\n\n
> $message","FROM:$addr\r\nMIME-Version: 1.0\r\nContent-type:
> text/html; charset=iso-8859-1")) {
> echo "

Email Error

\n\n

An internal
> error ment this email could not be sent, sorry.

";
> } else {
> echo "

Thank you

\n\n

The following
> was sent to us.

";
> echo $message;
> }
>

>
> In the mail function, get rid of the \r.


$addr\r\nMIME-Version: 1.0\r\nContent-type:

Which /r?
Sat 27/11/04 at 20:37
Regular
"Devil in disguise"
Posts: 3,151
This is from cjh's code

# Send email and say thank you.
if (! @mail("$addr", "$subject", "

Referrer : $referrer

\n\n $message","FROM:$addr\r\nMIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-1")) {
echo "

Email Error

\n\n

An internal error ment this email could not be sent, sorry.

";
} else {
echo "

Thank you

\n\n

The following was sent to us.

";
echo $message;
}


In the mail function, get rid of the \r.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Best Provider
The best provider I know of, never a problem, recommend highly
Paul
Everybody thinks I am an IT genius...
Nothing but admiration. I have been complimented on the church site that I manage through you and everybody thinks I am an IT genius. Your support is unquestionably outstanding.
Brian

View More Reviews

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

Go to Support Centre

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.