Hi phpbuilders,
I am new at this and wonder if anyone can help. I run a charity to get teens more to do. I have a php membership form that contains personal details (phone numbers, medical, etc). I would like to use this membership form to automatically create an attendance form in php script. In the attendance form, I only want to see the child's name with a radio box for when they attend.
Any anyone help me sort out this type of code. The membership form is detailed below.
<?php
/ subject email variable /
$emailSubject = 'Membership Form';
$webMaster = 'stephen@asapscotland.org';
/Gathering Data Variables /
$Name = $_POST['Name'];
$Email = $_POST['Email'];
$DoB = $_POST['DoB'];
$Phone = $_POST['Phone'];
$Gender = $_POST['Gender'];
$Year = $_POST['Year'];
$body = <<<EOD
<br><hr><br>
Name: $Name <br>
Phone: $Phone <br>
Email: $Email <br>
Gender: $Gender <br>
Year: $Year <br>
EOD;
$cvsData = $fn . $Name ."," . $Gender ."," . $Year ."," . $Phone ."," . $Email ."\n";
$ofile = fopen("Membership.txt","a+");
fwrite($ofile, $cvsData);
fclose ($ofile);
$theResults = <<<EOD
<html>
<head>
<title>ASAP says thank you</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #f1f1f1;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #666666;
text-decoration: none;
}
-->
</style>
</head>
$file = new SplFileObject("Membership.txt");
$file->setFlags(SplFileObject::READ_CSV);
foreach ($file as $row) {
list($name, $id, $date) = $row;
<div>
<div align="left">Thank you becoming a member and we hope you enjoy the experience!</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>
Thank you for any suggestions.
Stephen