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
Fri 26/11/04 at 22:51
Regular
"l33t cs50r"
Posts: 2,956
Damarus wrote:
> You're not planning on sending people virus' are you? :P

lol, nope, just have to get this project finished by Monday, have 14 forms to do and can work out the rest if I can gett some guidance on the first.

My PHP skills so suxor... too much time with ASP recently.
Fri 26/11/04 at 22:49
Regular
Posts: 4,279
You're not planning on sending people virus' are you? :P
Fri 26/11/04 at 22:38
Regular
"l33t cs50r"
Posts: 2,956
OK, couldn't get any of that to work...

What I really need is someone to take that page and stick the code in for me.

On submit, the form needs to send an HTML email containing all the data on that form (not to worried about layout just yet for the email) to a fixed email address.

The email should also contain ther refer to that page. ie. If the link has come through google, I need to capture that information to evaluate the success of a click through campaign on various search engines.

There should also be a hidden field wich giveds the name of the form in the mail (this can be the href/refer what ever)

Now due to time, I'm seriously debating paying for this just to get it out of the way.

Cheers

A
Fri 26/11/04 at 22:02
Regular
"NULL"
Posts: 1,384
Try that code I suggested - it should work. But just put a hidden field on the form page with the referrer in and delete the line referencing $_SERVER['HTTP_REFERRER']. There is no way to access the 2nd last page directly using PHP.

Page 0 = PHP page that the form is submitted to
Page -1 = Form page (this is accessed via $_SERVER['HTTP_REFERRER'])
Page -2 = The page you want to find - referrer of Page -1
Fri 26/11/04 at 21:49
Regular
"l33t cs50r"
Posts: 2,956
Nimco wrote:
>If there are any mistakes in there (which I'm sure there will be),
> please excuse me as I started drinking 4 hours ago....


lol, ideally, I need to be cheeky and ask for the whole solution... For once, I'm actually very desperate!
Fri 26/11/04 at 21:41
Regular
"NULL"
Posts: 1,384
How about something like:


$message = "";
foreach ($_POST as $key => $value)
{
$message .= $key . ": " . $value . "\n";
}

$message .= $_SERVER['HTTP_REFERRER'];

mail("[email protected]", "My Subject", $message);

?>

Though that referring url will be the one of the form page. You need to stick a hidden input on the form page using PHP or something to capture the referring URL.

If there are any mistakes in there (which I'm sure there will be), please excuse me as I started drinking 4 hours ago....
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

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Many thanks!
You were 100% right - great support!
Brilliant service.
Love it, love it, love it!
Christopher

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.