The title says it all. I have a html form(will paste the code in under) and i want, in the simplest way, to take this html form and make it so the user can hit the download button and the he will have a nice Excel sheet on what the costs are. And please keep in mind that i have very little experience with php.
<div class="option o-2"> <h4>Tilbehør bad</h4> <p>Velg ønsket baderomstilbehør</p> <!-- FOR Å FÅ NOE CHECKED SOM STANDARD LEGG TIL DETTE BAK NAME checked="checked" -->
<fieldset>
<p><label><input type="checkbox" data-cost="5160" value="Spotlight i bad" name="f_2[]" /> Spotlight i bad</label> <span class="staticPrice"><span class="hypen"> - </span>5160 NOK</span></p>
<p><label><input type="checkbox" data-cost="6400" value="Elektrisk gulvvarme i baderom" name="f_2[]" />Elektrisk gulvvarme i baderom</label> <span class="staticPrice"> <span class="hypen"> - </span>6400 NOK</span></p>
<p><label><input type="checkbox" data-cost="2050" value="Dusj loft" name="f_2[]" /> Forberedelse for dusj på loft</label> <span class="staticPrice"> <span class="hypen"> - </span>2020 NOK</span></p>
The way to approach this all depends on how you want it to look.
If you just want to dump out line after line of data, then you can quite easily convert your data into a serialized array and then create a file with Excel headers and just write the data into it
However, I think you'll want something to look reasonably attractive to the client, so I'd recommend looking into PHPExcel http://phpexcel.codeplex.com/
link to this form : HERE
If you just want to dump out line after line of data, then you can quite easily convert your data into a serialized array and then create a file with Excel headers and just write the data into it
However, I think you'll want something to look reasonably attractive to the client, so I'd recommend looking into PHPExcel
http://phpexcel.codeplex.com/