Re: mailing a cookiecontent

From: Date: Fri, 06 Sep 2002 00:37:53 +0000
Subject: Re: mailing a cookiecontent
Groups: php.general 
Request: Send a blank email to php-general+get-115376@lists.php.net to get a copy of this message
>if ($REQUEST_METHOD=='POST') { > $name = escapeshellcmd($name); > $group = escapeshellcmd($group); > $to = "me@myhost.se"; > $from = "FROM: $name, $group"; > $subject = "The subject of this mail\n\n"; > $body = "Name: $name\t"; > $body .= "Group: $group\n"; > $body .= "\n\n$comments\n\n"; > > mail($to,$subject,$body,$from); > exit; >} > >Well, I recieve a mail, but the mailcontent is empty. >The cookie string is written to a hidden field like this: > > document.write('<FORM><INPUT TYPE=HIDDEN NAME=\"comments\" >VALUE=\"'+cookiestr+'\"></FORM>'); Get rid of the JavaScript, and just do something like this: $body .= implode("\r\n", $_COOKIE); -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#115376) next »