Hello Y'all!
Has anyone been able to combine an HTML / Swift backed Form & a CSV database?
Tried to compine Form2CSVtable (http://www.danbp.org/form2csvtable.html) as it was only a very small php file with my Swift handler with no luck.
HTML / Swift Form & CSV Database [SOLVED]
Moderators: Chris Corbyn, General Moderators
HTML / Swift Form & CSV Database [SOLVED]
Last edited by eymorais on Wed Apr 23, 2008 9:10 am, edited 1 time in total.
Re: HTML / Swift Form & CSV Database
If anyone is trying to get this working, I was able to do it on my end...
The code is within a swift mailer php file....
If any one else has ideas on how to better this, just reply.
The code is within a swift mailer php file....
Code: Select all
if ($sent)
{
list($from, $junk) = split("@",$from_email);
$form_info = array(
'from' => $from,
'name' => $name,
'email' => $email,
'type' => $type,
'pckg' => $pckg,
'acct' => $acct,
'business' => $busname,
'username' => $username,
);
// Serialize the array
$serialized_info = serialize($form_info);
$str.= $serialized_info;
$str.= "\n";
// Write the formatted array to file
$file = 'data/form.txt';
$handle = fopen($file, 'a');
fwrite($handle, $str);
fclose($handle);
session_destroy ();
header("Location: ../success.php");
exit();
}
else
{
header("Location: ../form.php?error=sending");
exit();
}