Skip to content

Instantly share code, notes, and snippets.

@vsync
Created April 21, 2013 22:42
Show Gist options
  • Save vsync/5431372 to your computer and use it in GitHub Desktop.
Save vsync/5431372 to your computer and use it in GitHub Desktop.
$erase_options = array();
if (isset($_POST['default_options']) && is_array($_POST['default_options']))
foreach ($_POST['default_options'] as $opt => $val)
{
$themeSetArray[] = "($memID, 1, SUBSTRING('" . addslashes($opt) . "', 1, 255), SUBSTRING('" . (is_array($val) ? implode(',', $val) : $val) . "', 1, 65534))";
$erase_options[] = addslashes($opt);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment