Through the help of the forums I have a form working. I am still having trouble with getting the submitted data. Or more to the point I am having trouble figuring out how to determine the submit button has been pressed and executing resultant code. See the code below. I am trying to get the line "success" to print after submitting the form. All I do get is the form (still filled in) returned back.
I would appreciate any insights to what is missing.
<?php
function client_add() {
$edit = $_POST['edit'];
$op = $_POST['op'];
if ( $edit && $op == t('Submit') ) {
print "Success";
//drupal_goto()
}
$form = form_textfield('First Name', 'c_fname', $_POST['edit']['c_fname'], 25, 25, 'Enter Clients First name', NULL, true);
$form .= form_textfield('Last Name', 'c_lname', $_POST['edit']['c_lname'], 25, 25, 'Enter Clients Last name', NULL, true);
$form .= form_textfield('Home Phone', 'c_hphone', $_POST['edit']['c_hphone'], 25, 25, 'Enter Clients Home Phone Number', NULL, true);
$form .= form_textfield('Work Phone', 'c_wphone', $_POST['edit']['c_wphone'], 25, 25, 'Enter Clients Work Phone Number', NULL, false);
$form .= form_textfield('Email', 'c_email', $_POST['edit']['c_email'], 25, 25, 'Enter Clients Email Address', NULL, true);
$form .= form_textfield('First Name', 'cc_fname', $_POST['edit']['cc_fname'], 25, 25, 'Enter Co-Clients First name', NULL, false);