Bueno, no tiene mucha complicacion, solo ha que seguir el orden y la estructura.
Código PHP:
Ver original<?php
// The form processor PHP code
function process_si_contact_form()
{
$userName = @$_POST['userName'];
$password = @$_POST['password'];
if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['do'] == 'contact') {
// if the form has been submitted
foreach($_POST as $key => $value) {
// sanitize the input data
if ($key != 'ct_message') $value = strip_tags($value); }
}
$captcha = @$_POST['ct_captcha']; // the user's entry for the captcha code
$errors = array(); // initialize empty error array
// Only try to validate the captcha if the form has no errors
// This is especially important for ajax calls
require_once dirname(__FILE__) . '/securimage.php'; $securimage = new Securimage();
if ($securimage->check($captcha) == false) {
$errors['captcha_error'] = 'Verifica el resultado del captcha.';
//echo '<script language="javascript">alert("Verifica el resultado del captcha.");</script>';
}
// no errors, send the form
$return = array('error' => 0, 'message' => $userName); } else {
$errmsg = 'mensaje ok?';
foreach($errors as $key => $error) {
// set up error messages to display with each field
$errmsg .= " - {$error}\n";
}
$return = array('error' => 1, 'message' => $errmsg); }
} // POST
} // function process_si_contact_form()
?>
Pero el código que tu compartiste tiene el $_POST de las variables userName y password mal escrito, le falta una "T"