SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: $http_post_vars

  1. #1
    SitePoint Addict
    Join Date
    Sep 2001
    Location
    UK
    Posts
    303
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    $http_post_vars

    Will strip_tags($HTTP_POST_VARS); remove the tags from all the post variables or can this function be used only on individual variables ?

    Azaar

  2. #2
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://us2.php.net/manual/en/function.strip-tags.php

    Looks like just strings, not arrays.

    string strip_tags ( string str [, string allowable_tags])
    Haven't tested it to confirm, but when either an array or a string can be used it is called "mixed" in the manual.

    example:
    mixed str_replace ( mixed search, mixed replace, mixed subject)
    So you need to loop through the array.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  3. #3
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i usually do something like
    PHP Code:
    foreach($_POST as $key=>$value) {
        
    $_POST[$key]=stripslashes($value);

    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  4. #4
    SitePoint Addict
    Join Date
    Sep 2001
    Location
    UK
    Posts
    303
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank u both


Bookmarks

Posting Permissions

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