tjverge Posted February 1, 2011 Share Posted February 1, 2011 <form action="main.php?id=test.php" method="post"> <input name="name" type="text" /> <input name="submit" type="submit" value="Look Up" /> </form> <?php if(isset($_POST['submit'])) { $today = date("Y-m-d"); $pname = rawurlencode($_POST['name']); $xml_feed_url = 'http://api.eve-online.com/eve/CharacterID.xml.aspx?names='.$pname.''; The above works perfect until the user enters a character like ' to the box, how do I get it to pass the ' into the address? Thank you Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted February 1, 2011 Share Posted February 1, 2011 If: echo $pname; Gives: %5C%27 instead of %27, then magic_quotes_gpc is enabled and you need: $pname = rawurlencode(stripslashes($_POST['name'])); Quote Link to comment Share on other sites More sharing options...
tjverge Posted February 1, 2011 Author Share Posted February 1, 2011 Thanks it fixed it Quote Link to comment 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.