devarishi Posted December 17, 2009 Share Posted December 17, 2009 Hi All, I have two web pages in ASP: First web page (userData.asp) displays a form and the submit button passes the values to the second web page. The second web page (getData.asp) receives the query and saves it in a Database. So, far all is working fine! Well, I needed to email the same data (record consisting of around 8 or 10 text fields) to internal email IDs. As I don't know how to do that with ASP so I did it in PHP. So, I have another web page (email.php) which is called by the application getData.asp and at the end of this file is this line: Response.Redirect "email.php?n=" & Request.Form("analystName") & "&s=" & Request.Form("shift") & "&si=" & Request.Form("sIssue") & "&oi=" & Request.Form("oIssue") & "&q=" & Request.Form("qJ") & "&a=" & Request.Form("aJ") & "&f=" & Request.Form("fJ") & "&r=" & Request.Form("rmk") As it is clear from the above code line that parameters (variables) with their associated values are being sent to the PHP application email.php. The problem is that if, for example, the second parameter has a string in which the hash symbol ("#") is found then whatever follows it along with # gets truncated. Even none f the values of the other parameters after that one is passed to the email.php. So, how can I resolve this problem? The web form userData.asp calls the getData.asp web page and it gets everything right because the Submit button send the form's data. So, we are not passing any parameter to it manually. But when do it manually then we have to include %23 in place of # so that it can work fine. But, as the case, is I can only pass parameters along with the email.php url. So, how to rectify the problem just before we pass the parameters? email.php Example: If the first parameter (n) carries this value: I am the #1 star in the team! and the second parameter (s) carries this value: I am the boss now! <?php $message .= "<p>Analyst: "; $message .= $_REQUEST['n']; $message .= $_REQUEST['s']; echo $message; ?> then the output will be: I am the and the values of the other parameters are also truncated. Quote Link to comment https://forums.phpfreaks.com/topic/185497-pass-hash-contained-in-variables-in-the-parameter-list-along-with-a-url/ Share on other sites More sharing options...
Philip Posted December 17, 2009 Share Posted December 17, 2009 You'd have to do it on the ASP page - I know PHP has a urlencode function, and I'd imagine ASP does too Quote Link to comment https://forums.phpfreaks.com/topic/185497-pass-hash-contained-in-variables-in-the-parameter-list-along-with-a-url/#findComment-979415 Share on other sites More sharing options...
devarishi Posted December 17, 2009 Author Share Posted December 17, 2009 Yes, that function does the work in PHP. http://php.net/manual/en/function.urlencode.php But I am googling for a similar functionality in ASP. However, can we mix ASP and PHP- Can variables of ASP be used in PHP? Quote Link to comment https://forums.phpfreaks.com/topic/185497-pass-hash-contained-in-variables-in-the-parameter-list-along-with-a-url/#findComment-979425 Share on other sites More sharing options...
Philip Posted December 17, 2009 Share Posted December 17, 2009 ASP does too is a link http://www.w3schools.com/asp/met_urlencode.asp Quote Link to comment https://forums.phpfreaks.com/topic/185497-pass-hash-contained-in-variables-in-the-parameter-list-along-with-a-url/#findComment-979426 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.