Lassie Posted January 14, 2007 Share Posted January 14, 2007 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?phpechoLassie Link to comment https://forums.phpfreaks.com/topic/34120-difficulty-with-url-query-string/ Share on other sites More sharing options...
trq Posted January 14, 2007 Share Posted January 14, 2007 [code=php:0]."<p><a href='http://217.46.159.226/e_cart8/pick_up.php?pur_id=$hash>Download Your Purchase</a></p>\n</body>\n</html>\n";[/code] Link to comment https://forums.phpfreaks.com/topic/34120-difficulty-with-url-query-string/#findComment-160482 Share on other sites More sharing options...
Lassie Posted January 14, 2007 Author Share Posted January 14, 2007 Thanks for coming back.I tried it and did not get a download link with the hash.i got..This is an html email testYour order has been processed. Please click on the link to download your purchaseDownload Your Purchasei 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 Link to comment https://forums.phpfreaks.com/topic/34120-difficulty-with-url-query-string/#findComment-160706 Share on other sites More sharing options...
corillo181 Posted January 14, 2007 Share Posted January 14, 2007 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] Link to comment https://forums.phpfreaks.com/topic/34120-difficulty-with-url-query-string/#findComment-160711 Share on other sites More sharing options...
Lassie Posted January 15, 2007 Author Share Posted January 15, 2007 Hi,Tried that but the same result. Link shows as download only and the url doesnt show the hash.I want to pass the hash back from the customer so I can validate it.Should I make it a form? Link to comment https://forums.phpfreaks.com/topic/34120-difficulty-with-url-query-string/#findComment-161090 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.