and sorry for my english.
I am creating a link with php. I am sending it by email. Several times the link (via email) is broken.
When I click (or copy to the browser), an empty space is inserted into a random position.
any idea?
generate mail, the code is as follows:
$url="www.example.com/dir/subdir/page.php?param1=$p1¶m2=$p2¶m3=$p3[...]¶m20=$p20";
[...]
$body .= "<td><a href=\"$url\">";
$body .= htmlentities($url,ENT_NOQUOTES,'ISO-8859-1');
$body .= "</a></td>";
[...]
$headers = "From: $companyName < $companyMail > \r\n";
$headers .= "Reply-To: $companyMail \r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1 ";
$headers .= "Content-Type: text/html; charset=ISO-8859-1";
$headers .= "MIME-Version: 1.0 ";
mail($client, "Confirmaton", $body, $headers);
Example returned parameters on page.php
the code:
echo "<pre>Request:<br>";
print_r($_REQUEST);
echo "</pre><br>";
exit;
case OK:
Request:
Array
(
[p1] => value1
[p2] => value2
[p3] => value3
[p3] => value5
[p4] => value6
[p5] => value7
(...)
[p20] => value20
)
Error1 (link with space in value)
Request:
Array
(
[p1] => value1
[p2] => val ue2
[p3] => value3
[p3] => value5
[p4] => value6
[p5] => value7
(...)
[p20] => value20
)
Error2 (link with space in variable)
Request:
Array
(
[p1] => value1
[p2] => value2
[p_3] => value3
[p3] => value5
[p4] => value6
[p5] => value7
(...)
[p20] => value20
)
source
share