Help Please

coolhomecoolhome Junior MemberShared Hoster
I need to know how to take ~!@#$%^&;*()_+ and all the other things away from $_POST all i want to keep in message is the ABC's and Numbers. How can i do this?

Comments

  • danielneridanielneri WP V.I.P. VPS - Virtual Prince of the Server
    in what are you using this for? someone like python or nuvo would probably be better at helping you...
    ban1.gif
  • PythonPython Forum Leader The Royal RAM
    [PHP]
    <?php

    $_POST = ereg_replace("[^A-Za-z0-9]", "", $_POST);

    echo $_POST;

    ?>[/PHP]

    That should do it... It uses the ereg_replace function and gets rid of all non alpha-numeric characters and output the clean version

    The Royal Ram

  • coolhomecoolhome Junior Member Shared Hoster
    Thank but it is really for a register. Hacker Free Things. SO the code will keep Chars as ABC's and Numbers.
  • danielneridanielneri WP V.I.P. VPS - Virtual Prince of the Server
    SO the code will keep Chars as ABC's and Numbers.

    is that supposed to be a question?
    ban1.gif
Sign In or Register to comment.