Search the Community
Showing results for tags 'spreadsheet'.
-
I want to create a spreadsheet and then do a sort and display that sort as my html. Is there an easy way to do that?
- 1 reply
-
- excel
- spreadsheet
-
(and 1 more)
Tagged with:
-
Hi all,Online registration form which allow users to fill in their details and send the data by submitting the form to my email using php.I need to create an online registration form and when the form is submitted, the data needs to go in to a spreadsheet in (MS EXCEL). Maybe a database I guess..The data should be able to be accessed at any time and read by a spreadsheet by someone in the office. Someone sent me this code $df = fopen("php://output", 'w'); fputcsv($df, array_keys(reset($array))); foreach ($_POSTas $row) { fputcsv($df, $row); } fclose($df); Can anyone help me as to where and how I use this snippet to get it to work. Basically the form data needs to be written into a CSV file. Here is the form: <form action="http://www.sohrabgoodar.com/w-hill-contactformprocess.php" method="post" id="comments_form"><div class="row"> <div class="label">Name</div><!--end .label--> <div class="input"> <input type="text" for="name" id="name" class="detail" name="name" /> </div><!--end .input--> </div><!--end .row--> <div class="row"> <div class="label">Work Location</div><!--end .label--> <div class="input"> <input type="text" for="worklocation" id="worklocation" class="detail" name="worklocation" /> </div><!--end .input--> </div><!--end .row--> <div class="row"> <div class="label">Work Contact Number</div><!--end .label--> <div class="input"> <input type="text" for="worknumber" id="worknumber" class="detail" name="worknumber" /> </div><!--end .input--> </div><!--end .row--> <div class="row"> <div class="label">Mobile Contact Number</div><!--end .label--> <div class="input"> <input type="text" for="mobile" id="mobile" class="detail" name="mobile" /> </div><!--end .input--> </div><!--end .row--> <div class="row"> <div class="label">Email Address</div> <!--end .label--> <div class="input"> <input type="text" for="email" id="email" class="detail" name="email" /> </div><!--end .input--> </div><!--end .row--> <div class="row"> <div class="label">Ability Level</div> <!--end .label--> <div class="input3"> <select name="ability" for="ability" id="ability" class="detail"> <option>Please Choose</option> <option value="strong">Strong</option> <option value="medium">Medium</option> <option value="weak">Weak</option> </select> </div><!--end .input3--> </div><!--end .row--> <div class="row"> <div class="label">Tennis Standard</div> <!--end .label--> <div class="input3"> <select name="standard" for="standard" id="standard" class="detail"> <option>Please Choose</option> <option value="school">School</option> <option value="club">Club</option> <option value="county">County</option> <option value="international">International</option> </select> </div><!--end .input3--> </div><!--end .row--> <div class="row"> <div class="label">Frequency of Play</div> <!--end .label--> <div class="input3"> <select name="frequency" for="frequency" id="frequency" class="detail"> <option>Please Choose</option> <option value="weekly">Weekly</option> <option value="monthly">Monthly</option> <option value="fewtimes">Few Times a Year</option> </select> </div><!--end .input3--> </div><!--end .row--> <div class="row"> <div class="label2">Anything else you would like to tell us?</div><!--end .label2--> <div class="input2"> <textarea id="comment" name="comment" class="mess"></textarea> </div><!--end .input--> </div><!--end .row--> <div class="submit"> <input type="submit" id="submit" name="submit" value="Send Message" /> </div><!--end .submit--></form> Here is the old php file I was using to send the form data to emails. <?php $emailSubject = 'Tennis Registration!';$webMaster = 'someone@yahoo.co.uk';$nameField = $_POST['name'];$worklocationField = $_POST['worklocation'];$worknumberField = $_POST['worknumber'];$mobileField = $_POST['mobile'];$emailField = $_POST['email'];$abilityField = $_POST['ability'];$standardField = $_POST['standard'];$frequencyField = $_POST['frequency'];$commentField = $_POST['comment'];$body = <<<EOD<br><hr><br>Name: $nameField <br>Work location: $worklocationField <br>Work Number: $worknumberField <br>Mobile: $mobileField <br>Email: $emailField <br>Ability: $abilityField <br>Standard: $standardField <br>Frequency: $frequencyField <br>Comment: $commentField <br>EOD;$headers = "From: $email\r\n";$headers .= "Content-type: text/html\r\n";$success = mail($webMaster, $emailSubject, $body, $headers);$theResults = <<<EOD<p>Thank you for your Message! You will be redirected to the home page in a moment</p><script type="text/javascript" >setTimeout ('ourRedirect()', 3000)function ourRedirect(){ location.href='http://www.google.com/'}</script>EOD;echo "$theResults";?>
-
Hi there!! Is there any way to import values of an Excel spreadsheet's fields using PHP? any help will be appreciated! Thanks in advance!! atar.
- 1 reply
-
- excel
- spreadsheet
-
(and 1 more)
Tagged with: