FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
no_session_url ignored since php validation is implemented
#1
Hi,

Before I edited my form php files (using API) the no_sessions_url was working fine. Since I added form PHP validation this setting is ignored.

What am I doing wrong?

Code:
<?php
ini_set('display_errors', 1);
error_reporting( E_ALL);

require_once("/home/tandform/public_html/formtools/global/api/api.php");
$fields = ft_api_init_form_page("", "live", "tandform");    
// validation time!
$errors = array();
if (isset($_POST['submit']))
{
  $rules = array();
  $rules[] = "required,plaatstekort_7,PLAATSTEKORT (7): gelieve een selectie te maken.";
  $rules[] = "required,malocclusieh_8,HORIZONTALE MALOCCLUSIE (8): gelieve een selectie te maken";
  $rules[] = "required,malocclusiev_9,VERTICALE MALOCCLUSIE (9): gelieve een selectie te maken.";
  $errors = validate_fields($_POST, $rules);

  // no errors - process the page. The ft_api_process_form does
  // the job of both updating the database and redirecting to the next page
  if (empty($errors))
  {
  $params = array(
  "no_sessions_url" => "index.php",
  "namespace" => "tandform",
  "submit_button" => "submit",
  "next_page" => "index3.php",
  "form_data" => $_POST
    );
  ft_api_process_form($params);
  }
  // failed validation. Update $fields with the latest contents of the form data
  else
  {
    $fields = array_merge($_SESSION["tandform"], $_POST);
  }
}
?>
Reply
#2
Is there really nobody who can answer this question?

Why is no_sessions_url ignored when using php form validation while it works perfectly without the formvalidation lines? :/
Reply
#3
I added form PHP validation this setting is ignored.
NOOR
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)