Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default Adding slashes on all of an array?

    How would it be done ive tried addslashes( $_POST ) but it doenst work

    +rep
    Lets set the stage on fire, and hollywood will be jealous.

  2. #2
    Join Date
    Jul 2008
    Posts
    16
    Tokens
    0

    Default

    You'd have to probaly use foreach post array and split them into single results applying the addslashes to each one of them, although that may be incorrect.

  3. #3
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    PHP Code:

    foreach( $_POST as $var => $val )
    {

        $
    $var addslashes$val );


    Something like that :S

  4. #4
    Join Date
    Oct 2006
    Location
    Peterborough, UK
    Posts
    3,855
    Tokens
    216

    Latest Awards:

    Default

    PHP Code:
    foreach( $_POST as $key => $value )
    {
            
    $_POST$key ] = addslashes$value );

    Works for get too.


    visit my internet web site on the internet
    http://dong.engineer/
    it is just videos by bill wurtz videos you have been warned

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •