I used this method over here: http://www.codingforums.com/showthread.php?t=146487
------------------------------------
I have an html form that prints into a .csv file using php.
Code: Select all
<?php
$Name = $_POST['Name'];
$Company = $_POST['Company'];
$Email = $_POST['Email'];
$Phone = $_POST['Phone'];
$cvsData = $Name . "," . $Company . "," . $Email . "," . $Phone ."\n";
$fp = fopen ("signup.csv","a");
if($fp){
fwrite($fp,$cvsData);
fclose($fp);
}
?>The following code loads the page but I need to have a proper "if" which is where I'm having a little trouble.
Code: Select all
print "<meta http-equiv=\"refresh\" content=\"0;URL=thanks.php\">";Any help would be greatly appreciated, I'm sure there's a simple answer out there. All I need to know is how to do "If the data was submitted to the .csv (or even simply if the submit button was pressed?), then open this webpage". If you're feeling generous I'd also like to see how a dialog box would work, but I'm not too good with Javascript either.