PDA

View Full Version : checking for spam



bberry91
30 May 2011, 08:14 PM
i am using an array for spam checking. here is my code on my registration page:


if (isset($_POST['submit'])) {

// HUMAN VERIFICATION PROCESS
session_start();
include('q_and_a.php');
$bot['q'] = $questions[$_SESSION['question']]['q'];
$bot['a'] = $questions[$_SESSION['question']]['a'];
echo $bot['a'];

on my q and a page, here is what i have:



$questions = array();
$questions[] = array('q' => 'What is 5 + 3?', 'a' => '8');
$questions[] = array('q' => 'What is 3 + 2?', 'a' => '5');

when i echo $bot['a'], why does it come up with nothing?