nine72 Posted February 19, 2008 Share Posted February 19, 2008 ok, so I have this form(s)...saving the input to the session. I need to take what is saved in the session strip special characters and then have it return back the var that I state it equals. exp. $_SESSION['agentId'] = $agentId - need to strip special characters at this point then enter the stripped var into a new string $xmlString .= "<agent>" . $agentId . "</agent>"; I need to do this some 400+ times... Thanks in advance.... Quote Link to comment Share on other sites More sharing options...
Chris92 Posted February 19, 2008 Share Posted February 19, 2008 htmlspecialenitities() Quote Link to comment Share on other sites More sharing options...
craygo Posted February 19, 2008 Share Posted February 19, 2008 can try this function http://nadeausoftware.com/articles/2007/09/php_tip_how_strip_html_tags_web_page Ray Quote Link to comment Share on other sites More sharing options...
nine72 Posted February 19, 2008 Author Share Posted February 19, 2008 thanks for the susguestions they are both intresting possiblities... would it work if I did something along this line... $_SESSION['agentId'] = $agentId $agentId = preg_replace("/[^a-zA-Z0-9s]/", "", $agentId); or somthing like if (!isset($_SESSION['agentId']), ereg("[0-9!@#$%^&*()]", $agentId)) { $xmlString .= "<agent>" . $agnetId . "</agent>"; } or am I just WAYYY off.... 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.