• I am using tab and tab names goes as URL parameter, I wonder what is the best way to sanitize it. $tab = (!empty($_GET[‘tab’]))? ($_GET[‘tab’]) : ‘about’;
    should I use sanitize_text_field ?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • If your specification to $tab is expected to be a string, I would suggest sanitize_text_field to back it up – so yes.

Viewing 1 replies (of 1 total)
  • The topic ‘How should I sanitize GET variable’ is closed to new replies.