jaxson
03-13-2005, 04:45 AM
Hello,
I am trying to build an attendance tracking for my baseball team. In short I am trying to use comboBox with name, date, and if they can attend the game. Ultimately I would like to have the data sent to a CSV file for better reporting.
I have been trying to first tackle sending the data to a text file using PHP before trying to send to a CSV file. I have been all over the web and read so many forums and can’t find my answers. If anyone could help me figure out two major areas I can’t seem to figure out.
1. Post data that is selected from a comboBox
2. Using PHP have the selections be sent to a CSV or text file reporting.
I would be so grateful to you. It was created with Flash MX 2004. I have listed the programming code below but if you would like to download the source files you can do so at:
www.ltrcdodgers.com/attend/attend02.zip (http://www.ltrcdodgers.com/attend/attend02.zip)
Here is the flash code on the submit button.
//sending data
on (release) {
myData.who = this.name_cb.selectedItem.label;
myData.date = this.date_cb.selectedItem.label;
myData.yes = this.yes_cb.selectedItem.label;
loadVariablesNum("text.php", myData, "POST");
gotoAndStop(2);
}
Here is the PHP I Frankensteined together but can’t get anything to post in my text file
<?php
$who = $_Post['who'];
$date = $_POST['date'];
$yes = $_POST['yes'];
$toSave ="who=$who, date=$date, yes=$yes";
$fp = fopen("data.txt", "a");
fwrite($fp,$toSave);
fclose($fp);
?>
Thank you in advanced for helping.
I am trying to build an attendance tracking for my baseball team. In short I am trying to use comboBox with name, date, and if they can attend the game. Ultimately I would like to have the data sent to a CSV file for better reporting.
I have been trying to first tackle sending the data to a text file using PHP before trying to send to a CSV file. I have been all over the web and read so many forums and can’t find my answers. If anyone could help me figure out two major areas I can’t seem to figure out.
1. Post data that is selected from a comboBox
2. Using PHP have the selections be sent to a CSV or text file reporting.
I would be so grateful to you. It was created with Flash MX 2004. I have listed the programming code below but if you would like to download the source files you can do so at:
www.ltrcdodgers.com/attend/attend02.zip (http://www.ltrcdodgers.com/attend/attend02.zip)
Here is the flash code on the submit button.
//sending data
on (release) {
myData.who = this.name_cb.selectedItem.label;
myData.date = this.date_cb.selectedItem.label;
myData.yes = this.yes_cb.selectedItem.label;
loadVariablesNum("text.php", myData, "POST");
gotoAndStop(2);
}
Here is the PHP I Frankensteined together but can’t get anything to post in my text file
<?php
$who = $_Post['who'];
$date = $_POST['date'];
$yes = $_POST['yes'];
$toSave ="who=$who, date=$date, yes=$yes";
$fp = fopen("data.txt", "a");
fwrite($fp,$toSave);
fclose($fp);
?>
Thank you in advanced for helping.