<?php lib("purecaptcha"); $captcha = new PureCaptcha(); if (isset($_GET['t'])) { $index = $_GET['t'] . "_captcha"; } else { $index = "captcha"; } $_SESSION[$index] = $captcha->show();
<?php session_start(); if (!isset($_GET['t'])) { $title = "default"; } else { $title = $_GET['t']; } require_once "purecaptcha.php"; $p = new PureCaptcha(); $_SESSION["captcha_{$title}"] = $p->show();