Hi all
I have got a problem, i have taken a script but theres one part I dont understand, It works for me when I write the mail line and variables myself but when i use this script it falls over. As I say i have written my own but i'd still like to understand why this fals on its arse.
The lines i have a problems with are the strtok ones. For some reason it uses rn as the token. But when I use my name "chris" and my email "chris@techsupport...." after those lines it strips them back to "ch".
But what has got me is that the name and string fields are stored correctly in $name and $email, but if I comment out the strtok lines the script doesnt work at all.
clueless :-s
*******************************************************
$mailto = $_POST['email'];
$subject = "RCB Assist site - download locations";
$formurl = "$errorurl = "$thankyouurl = "
$name = $_POST['name'];
$email = $_POST['email'];
$http_referrer = getenv( "HTTP_REFERER" );
if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit;
}
if (empty($name) || empty($email)) {
header( "Location: $errorurl" );
exit;
}
$name = strtok( $name, "rn" );
$email = strtok( $email, "rn" );
$messageproper =
"This message was sent from:\n" .
"$http_referrer\n" .
"--------------------------Message----------------------------------\n" .
"Name:$name\n" .
"Email:$email\n" .
"
Dear $name,
message body
" .
"\n-------------------------------------------------------------------\n";
mail($mailto, $subject, $messageproper, "From: $name <$email>rnReply-To: $name);
<$email>rnX-Mailer: Mailer v1.0" );
header( "Location: $thankyouurl" );
exit;
*******************************************************
'mi casa es su casa'
]-=tty0=-[
I have got a problem, i have taken a script but theres one part I dont understand, It works for me when I write the mail line and variables myself but when i use this script it falls over. As I say i have written my own but i'd still like to understand why this fals on its arse.
The lines i have a problems with are the strtok ones. For some reason it uses rn as the token. But when I use my name "chris" and my email "chris@techsupport...." after those lines it strips them back to "ch".
But what has got me is that the name and string fields are stored correctly in $name and $email, but if I comment out the strtok lines the script doesnt work at all.
clueless :-s
*******************************************************
$mailto = $_POST['email'];
$subject = "RCB Assist site - download locations";
$formurl = "$errorurl = "$thankyouurl = "
$name = $_POST['name'];
$email = $_POST['email'];
$http_referrer = getenv( "HTTP_REFERER" );
if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit;
}
if (empty($name) || empty($email)) {
header( "Location: $errorurl" );
exit;
}
$name = strtok( $name, "rn" );
$email = strtok( $email, "rn" );
$messageproper =
"This message was sent from:\n" .
"$http_referrer\n" .
"--------------------------Message----------------------------------\n" .
"Name:$name\n" .
"Email:$email\n" .
"
Dear $name,
message body
" .
"\n-------------------------------------------------------------------\n";
mail($mailto, $subject, $messageproper, "From: $name <$email>rnReply-To: $name);
<$email>rnX-Mailer: Mailer v1.0" );
header( "Location: $thankyouurl" );
exit;
*******************************************************
'mi casa es su casa'
]-=tty0=-[