Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <link href="style.css" rel="stylesheet" type="text/css" />
- <?php
- $successMessage = '<h1>Thank you for your registration</h1><p>We will contact you with more information closer to the time of the party.</p>';
- ?>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Beta Splash Page</title>
- </head>
- <body>
- <!--main div start -->
- <div id="mainDiv" class="emailForm3Bg">
- <!--opacity part start -->
- <div class="opacityDiv">
- <?php
- $file = 'data.csv';
- $name = $_REQUEST['name'];
- $attendance = $_REQUEST['attendance'];
- $email = $_REQUEST['email'];
- $additional = array($attendance,$name,$email);
- if($email!=""&&$email!="Email"){
- $fp = fopen($file, 'a');
- fputcsv($fp, $additional, ',');
- fclose($fp);
- chmod($file,0600);
- echo $successMessage;
- }else{
- ?> <h1>Sorry!</h1><p>Your email address is required. <a href="index.php">Click here to go back</a></p><?php
- }?>
- </div>
- <!--right part end -->
- <br class="spacer" />
- </div>
- <!--opacity part end -->
- </div>
- <!--main div end -->
- </body>
- </html>
- <?php
- /*function fputcsv($fp, $arr, $del=",", $enc="\"") {
- fwrite($fp, (count($arr)) ? $enc . implode("{$enc}{$del}{$enc}", str_replace("\"", "\"\"", $arr)) . $enc . "\n" : "\n");
- } */
- ?>
Add Comment
Please, Sign In to add comment