May 13th, 2009, 7:07 PM
I am trying to submit a form using the API Code submission. I cannot get the form to initialize. This is my first attempt using code and CAPTCHA combined. I must be missing something very simple but it all looks correct. Any help would be appreciated. Sorry for all the code.
CODE:
config.php file
<?php
// main program paths - no trailing slashes!
$g_root_url = "./data/";
$g_root_dir = "/home/site/public_html/data";
$g_api_recaptcha_private_key = "xxxxxxxxxxxxxx";
$g_api_recaptcha_public_key = "yyyyyyyyyyyyyy";
// database settings
$g_db_hostname = "localhost";
$g_db_name = "";
$g_db_username = "";
$g_db_password = "";
$g_table_prefix = "ft_";
?>
FORM:
<?php
require_once("/home/site/public_html/data/global/api/api.php");
$fields = ft_api_init_form_page(1, "initialize");
$params = array(
"submit_button" => "Place Bid",
"next_page" => "/home/site/public_html/nightfall/",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
?>
FORM ACTION:
<form action="<?=$_SERVER["PHP_SELF"]?>" method="post">
CODE:
config.php file
<?php
// main program paths - no trailing slashes!
$g_root_url = "./data/";
$g_root_dir = "/home/site/public_html/data";
$g_api_recaptcha_private_key = "xxxxxxxxxxxxxx";
$g_api_recaptcha_public_key = "yyyyyyyyyyyyyy";
// database settings
$g_db_hostname = "localhost";
$g_db_name = "";
$g_db_username = "";
$g_db_password = "";
$g_table_prefix = "ft_";
?>
FORM:
<?php
require_once("/home/site/public_html/data/global/api/api.php");
$fields = ft_api_init_form_page(1, "initialize");
$params = array(
"submit_button" => "Place Bid",
"next_page" => "/home/site/public_html/nightfall/",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
?>
FORM ACTION:
<form action="<?=$_SERVER["PHP_SELF"]?>" method="post">