0

Hello. Does anyone know why strip_tags() is apparently returning an empty string in the code below? If I get rid of the strip_tags(), it works, but with strip tags, it displays the message about no ticket number being entered. I'm just sending it "http://[omitted].php?ticketNum=1", so there aren't even any tags to remove. This is modeled after some code a professor gave me that worked before, so I'm stumped. Thanks in advance.

if (isset($_GET['ticketNum'])){
  if (get_magic_quotes_gpc()){
    $_GET['ticketNum'] = stripslashes($_GET['ticketNum']);
  }
  $ticketNum = trim(strip_tags($GET_['ticketNum']));
}
    
if (empty($ticketNum)){
  $results['success'] = 'false';
  $results['reason'] = "No ticket number was entered.";
}
1
Contributor
1
Reply
2
Views
6 Years
Discussion Span
Last Post by bgx90
0

I found the problem. On line 5 I had "$GET_" instead of "$_GET."

Edited by bgx90: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.