Well I'm just going around in circles here now, getting seriously fed up with it too. This should be a simple process yet I receive no error warnings, nothing to show why this submission won't work and I'm about ready to dump Form Tools - this is costing simply too much time to get done and I'm way behind schedule now.
Sorry for the rant but I'm frustrated.
So here's my set up in more detail, firstly my form - I stripped this down to a simple single edit box and a submit button just to test, code as follows:
<?php
require_once("/home/lkssvorm/public_html/ftools/global/api/api.php");
$fields = ft_api_init_form_page(1, "initialize");
$params = array(
"Button" => "Submit",
"next_page" => "success.php",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Untitled Page</title>
<meta name="generator" content="WYSIWYG Web Builder 8 - http://www.wysiwygwebbuilder.com">
<style type="text/css">
div#container
{
width: 1250px;
position: relative;
margin-top: 0px;
margin-left: auto;
margin-right: auto;
text-align: left;
}
body
{
text-align: center;
margin: 0;
background-color: #FFFFFF;
color: #000000;
}
</style>
<style type="text/css">
a
{
color: #0000FF;
text-decoration: underline;
}
a:visited
{
color: #800080;
}
a:active
{
color: #FF0000;
}
a:hover
{
color: #0000FF;
text-decoration: underline;
}
</style>
<style type="text/css">
#wb_Form1
{
background-color: #FAFAFA;
border: 0px #000000 solid;
}
#wb_Text1
{
background-color: transparent;
border: 0px #000000 solid;
padding: 0;
}
#wb_Text1 div
{
text-align: left;
}
#Editbox1
{
border: 1px #C0C0C0 solid;
background-color: #FFFFFF;
color :#000000;
font-family: Verdana;
font-size: 16px;
text-align: left;
vertical-align: middle;
}
#Button1
{
color: #000000;
font-family: Verdana;
font-size: 16px;
}
</style>
</head>
<body>
<div id="container">
<div id="wb_Form1" style="position:absolute;left:0px;top:0px;width:625px;height:323px;z-index:3;">
<form name="registration" form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST"> <enctype="text/plain" id="Form1">
<div id="wb_Text1" style="position:absolute;left:40px;top:66px;width:238px;height:18px;z-index:0;text-align:left;">
<span style="color:#000000;font-family:Verdana;font-size:16px;"> NAME</span></div>
<input type="text" id="Editbox1" style="position:absolute;left:318px;top:60px;width:269px;height:20px;line-height:20px;z-index:1;" name="Editbox1" value="">
<input type="submit" id="Button1" name="" value="Submit" style="position:absolute;left:258px;top:149px;width:96px;height:25px;z-index:2;">
</form>
</div>
</div>
</body>
</html>
Next my success.php file, again I stripped everything out so this is also just to test:
<?php
require_once("/home/lkssvorm/public_html/ftools/global/api/api.php");
$fields = ft_api_init_form_page();
ft_api_clear_form_sessions();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>success</title>
<meta name="generator" content="WYSIWYG Web Builder 8 - http://www.wysiwygwebbuilder.com">
<style type="text/css">
div#container
{
width: 1250px;
position: relative;
margin-top: 0px;
margin-left: auto;
margin-right: auto;
text-align: left;
}
body
{
text-align: center;
margin: 0;
background-color: #FFFFFF;
color: #000000;
}
</style>
<style type="text/css">
a
{
color: #0000FF;
text-decoration: underline;
}
a:visited
{
color: #800080;
}
a:active
{
color: #FF0000;
}
a:hover
{
color: #0000FF;
text-decoration: underline;
}
</style>
</head>
<body>
<div id="container">
<div id="wb_text_holder_shape" style="position:absolute;left:201px;top:227px;width:820px;height:529px;opacity:0.75;-moz-opacity:0.75;-khtml-opacity:0.75;filter:alpha(opacity=75);z-index:0;">
<img src="images/img0051.gif" id="text_holder_shape" alt="" style="border-width:0;width:820px;height:529px;"></div>
<button id="AdvancedButton2" type="button" onclick="window.location='http://mywebsite/home.html'" name="" value="" style="position:absolute;left:368px;top:462px;width:445px;height:80px;z-index:1;"><div style="text-align:center"><span style="color:#000000;font-family:Verdana;font-size:16px"> Click here to return to Home page</span></div></button>
</div>
</body>
</html>
I have checked the following:
Path to api.php is correct in both files. Both file reside in the root folder of my public_html (I have also checked by entering the path directly into the URL field of the browser and I can directly find both files.
I can't for the life of me find anything wrong yet I am unable to submit the data - on clicking submit the form clears (it appears as if the page reloads) but I am not re-directed to the success.php page and Form Tools does not receive the form data.
Please help me with this if you can!
Thanks
PS If I add the form directly using the direct to process.php method everything works fine, I would much rather use the API method though so any help would be much appreciated. Thanks!
Sorry for the rant but I'm frustrated.
So here's my set up in more detail, firstly my form - I stripped this down to a simple single edit box and a submit button just to test, code as follows:
<?php
require_once("/home/lkssvorm/public_html/ftools/global/api/api.php");
$fields = ft_api_init_form_page(1, "initialize");
$params = array(
"Button" => "Submit",
"next_page" => "success.php",
"form_data" => $_POST,
"finalize" => true
);
ft_api_process_form($params);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Untitled Page</title>
<meta name="generator" content="WYSIWYG Web Builder 8 - http://www.wysiwygwebbuilder.com">
<style type="text/css">
div#container
{
width: 1250px;
position: relative;
margin-top: 0px;
margin-left: auto;
margin-right: auto;
text-align: left;
}
body
{
text-align: center;
margin: 0;
background-color: #FFFFFF;
color: #000000;
}
</style>
<style type="text/css">
a
{
color: #0000FF;
text-decoration: underline;
}
a:visited
{
color: #800080;
}
a:active
{
color: #FF0000;
}
a:hover
{
color: #0000FF;
text-decoration: underline;
}
</style>
<style type="text/css">
#wb_Form1
{
background-color: #FAFAFA;
border: 0px #000000 solid;
}
#wb_Text1
{
background-color: transparent;
border: 0px #000000 solid;
padding: 0;
}
#wb_Text1 div
{
text-align: left;
}
#Editbox1
{
border: 1px #C0C0C0 solid;
background-color: #FFFFFF;
color :#000000;
font-family: Verdana;
font-size: 16px;
text-align: left;
vertical-align: middle;
}
#Button1
{
color: #000000;
font-family: Verdana;
font-size: 16px;
}
</style>
</head>
<body>
<div id="container">
<div id="wb_Form1" style="position:absolute;left:0px;top:0px;width:625px;height:323px;z-index:3;">
<form name="registration" form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST"> <enctype="text/plain" id="Form1">
<div id="wb_Text1" style="position:absolute;left:40px;top:66px;width:238px;height:18px;z-index:0;text-align:left;">
<span style="color:#000000;font-family:Verdana;font-size:16px;"> NAME</span></div>
<input type="text" id="Editbox1" style="position:absolute;left:318px;top:60px;width:269px;height:20px;line-height:20px;z-index:1;" name="Editbox1" value="">
<input type="submit" id="Button1" name="" value="Submit" style="position:absolute;left:258px;top:149px;width:96px;height:25px;z-index:2;">
</form>
</div>
</div>
</body>
</html>
Next my success.php file, again I stripped everything out so this is also just to test:
<?php
require_once("/home/lkssvorm/public_html/ftools/global/api/api.php");
$fields = ft_api_init_form_page();
ft_api_clear_form_sessions();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>success</title>
<meta name="generator" content="WYSIWYG Web Builder 8 - http://www.wysiwygwebbuilder.com">
<style type="text/css">
div#container
{
width: 1250px;
position: relative;
margin-top: 0px;
margin-left: auto;
margin-right: auto;
text-align: left;
}
body
{
text-align: center;
margin: 0;
background-color: #FFFFFF;
color: #000000;
}
</style>
<style type="text/css">
a
{
color: #0000FF;
text-decoration: underline;
}
a:visited
{
color: #800080;
}
a:active
{
color: #FF0000;
}
a:hover
{
color: #0000FF;
text-decoration: underline;
}
</style>
</head>
<body>
<div id="container">
<div id="wb_text_holder_shape" style="position:absolute;left:201px;top:227px;width:820px;height:529px;opacity:0.75;-moz-opacity:0.75;-khtml-opacity:0.75;filter:alpha(opacity=75);z-index:0;">
<img src="images/img0051.gif" id="text_holder_shape" alt="" style="border-width:0;width:820px;height:529px;"></div>
<button id="AdvancedButton2" type="button" onclick="window.location='http://mywebsite/home.html'" name="" value="" style="position:absolute;left:368px;top:462px;width:445px;height:80px;z-index:1;"><div style="text-align:center"><span style="color:#000000;font-family:Verdana;font-size:16px"> Click here to return to Home page</span></div></button>
</div>
</body>
</html>
I have checked the following:
Path to api.php is correct in both files. Both file reside in the root folder of my public_html (I have also checked by entering the path directly into the URL field of the browser and I can directly find both files.
I can't for the life of me find anything wrong yet I am unable to submit the data - on clicking submit the form clears (it appears as if the page reloads) but I am not re-directed to the success.php page and Form Tools does not receive the form data.
Please help me with this if you can!
Thanks
PS If I add the form directly using the direct to process.php method everything works fine, I would much rather use the API method though so any help would be much appreciated. Thanks!