Q&A

query_vars[‘myvar’]))
{
$page = $wp_query->query_vars[‘myvar’];
}

// do the search as a simple SQL filter based on URL parameter
$search = “”;
if (isset($wp_query->query_vars[‘srch’]))
{
$search = ” AND (answer LIKE ‘%” .$wp_query->query_vars[‘srch’] . “%’ OR question LIKE ‘%” .$wp_query->query_vars[‘srch’] . “%’ )”;
}

$wpdb = mysql_connect (‘205.178.146.93’, DB_USER, DB_PASSWORD);
if (!$wpdb) {
die(‘Could not connect: ‘ . mysql_error());
}

$query = “SELECT question, answer FROM 1_0320a9d_0.wp_faq_build_questions WHERE status = 1 ” .$search .” ORDER BY question ASC”;

$res = mysql_query($query, $wpdb);
if (!$res) {
die(‘Invalid query: ‘ . mysql_error());
}

$cnt = mysql_num_rows($res);
$cnt = intval($cnt);

if ($_GET[‘ty’] == 1) {
echo ‘

Thank you for submitting your question.

‘;
}
if ($_GET[‘wc’] == 1) {
echo ‘

The CAPTCHA you entered was incorrect. Please try again.

‘;
}
?>

Search the Q&A:

‘.$i.’ ‘);
}
if ($cnt % PER_PAGE) {
//$i++;
echo(‘‘.$i.’ ‘);
};
?>

“.ltrim($all[$i][0], “0”).”

“.$all[$i][1].”

“;
}

// for captcha below
$rn = rand(1, 10000);
?>


Ask a Question

Enter your question: Type this random number: :