Jump to content

difficulty with url query string


Lassie

Recommended Posts

As part of a download i am trying to append a folder reference to a download tag.
When the link is clicked I want to capture the folder reference to validate the download.
the folder ref is a hash variable.
I have appended the hash to the link but it doent show in the url that is sent back.
Is my logic wrong or my code awry.

[code]
$to = "$email";
$subj = "test";
$mess = "<html>\n"
."<head>\n"
."<title>Test Mail</title>\n"
."</head>\n"
."<body>\n"
."This is an html email test<br />\n"
."<p><b>Your order has been processed. Please click on the link to download your purchase</b></p>\n"
[b]."<p><a href='http://217.46.159.226/e_cart8/pick_up.php?pur_id=<?php echo '$hash'; ?'>Download Your Purchase</a></p>\n"[/b] ."</body>\n"
."</html>\n";
$mess = wordwrap($mess,70);

$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

mail($to,$subj,$mess,$headers);
[/code]
the url shows this  http://217.46.159.226/e_cart8/pick_up.php?pur_id=%3C?phpecho
Lassie
Link to comment
https://forums.phpfreaks.com/topic/34120-difficulty-with-url-query-string/
Share on other sites

Thanks for coming back.
I tried it and did not get a download link with the hash.
i got..This is an html email test

Your order has been processed. Please click on the link to download your purchase

Download Your Purchase
i want the hash to either append the download or appear in the url.
ie a link like[u] Download your purchase=233444...[/u]
thank you again for your help.
I feel I am not understaning the logic of how to do this.
If u have any more suggestions i wouldbe v grateful.
lassie
try this and let me know if it works..

[code]
<?php
$to = "$email";
$subj = "test";
$mess = "<html>\n"
."<head>\n"
."<title>Test Mail</title>\n"
."</head>\n"
."<body>\n"
."This is an html email test<br />\n"
."<p><b>Your order has been processed. Please click on the link to download your purchase</b></p>\n"
."<p><a href='http://217.46.159.226/e_cart8/pick_up.php?pur_id=<?php echo '$hash'; ?'>Download Your Purchase</a></p>\n"."</body>\n"
."</html>\n";
$mess = wordwrap($mess,70);

$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

mail($to,$subj,$mess,$headers);
  ?>
[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.