ok
<?php session_start(); if ($_POST['captcha'] == $_SESSION['captcha_code']) { echo 'true'; } else { echo 'false'; }