Skip to content

Instantly share code, notes, and snippets.

@vvikramjhu
Created February 12, 2014 22:48
Show Gist options
  • Save vvikramjhu/8966141 to your computer and use it in GitHub Desktop.
Save vvikramjhu/8966141 to your computer and use it in GitHub Desktop.
<?php
require_once("includes/common_functions.php");
$mysqli = connect_to_mysql("db_connection.cfg");
$debug = debug_mode("db_connection.cfg");
/* type_id below is different from type of term which are vendor/products/CVE_search/
* CvSS_score_search etc.
*/
$type_id = trim(strip_tags($_GET['type_id']));
$fullTerm = trim(strip_tags($_GET['search_term']));
separateTermType($fullTerm);
/* $term is of the form a (b). b is the type of the term ie vendor/product/CVE_search/
* CVSS_score_search etc. This type is DIFFERENT from $type_id above .We need to
* separate a and b.
*/
function separateTermType($term) {
list($term, $termType) = explode(" ", $term);
if ($debug) {
var_dump($term) ;
}
}
break;
function fillSearchbox($type_id, $term, $mysqli) {
;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment