Results 1 to 2 of 2

Thread: strip_tags not working

  1. #1
    Join Date
    Oct 2006
    Posts
    183
    Thanks
    0
    Thanked 11 Times in 11 Posts

    Unhappy strip_tags not working

    ive got this section of code and strip_tags wont work. help?

    Code:
    if($_GET['write']=="true"){
    
    $insertUserID = trim($_POST['fb_sig_user']);
    $checkPrayers = trim(strip_tags($_POST['insertPrayers']));
    if($checkPrayers=="" || checkPrayers==" "){
    $insertPrayers = "This user has not set any prayer requests.";
    }else{
    $insertPrayers = addslashes(preg_replace("/\n[^\w]*\n/","\n",$checkPrayers));
    }
    if(isset($_POST['fb_sig_user']) && isset($_POST['fb_sig_session_key']) && isset($_POST['fb_sig_time']) && isset($_POST['fb_sig']) && isset($_POST['fb_sig_api_key']) && isset($user) && $_POST['fb_sig_user']==$user) {
    
    $insert=mysql_query("INSERT INTO fbpl_udata_dev (id,prayers) VALUES ('$insertUserID', '$insertPrayers')
     ON DUPLICATE KEY UPDATE prayers='$insertPrayers';")
    or die ("Could not update prayer list: " . mysql_error());
    }
    description of whats goin on...
    makes sure prayers is set, or if it isnt then write the no prayers set thing... but its supposed to take out tags right there. then it makes sure that there are no multiple line breaks, only 1 should be there... then checks a bunch of variables, makes sure they are set so it can put in things only when through the form rather than going to just the page and setting a blank row, then inserts data into mysql. the prob is the strip_tags wont work, and i dont see why...

  2. #2
    Join Date
    Oct 2006
    Posts
    183
    Thanks
    0
    Thanked 11 Times in 11 Posts

    Default

    can anybody help?

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
  •