processing multicheckboxes into csv file
Posted: Thu Jan 12, 2012 5:29 pm
Hi,
I am total beginner in php, all my knowledge i glued from interne sources, so i realy dont have any theoretical background, no training, nothing..
i have maybe very simple problem for you. I have created a form with multiple checkboxes. it is showed here:
<form name="cezform" action="export.php" method="POST" onsubmit="return formvalidation(this)">
<b>Something </b><br>
<input type="checkbox" name="anything[]" value="pozvanky" checked> Pozvánky<br>
<input type="checkbox" name="anything[]" value="program" checked > Program <br>
<input type="checkbox" name="anything[]" value="etikety" checked> Etikety na víno
</form>
i use export.php for processing and also i want it to be exported in .csv file. so in my export I have this so far:
$tlacoviny = $_POST['tlacoviny']; I think this may look differently, because it doesnt call all the names...I really dont know..
this is how it is coded to be exported to .csv
$csv= <<<EOD
<html>
<head>
</head>
<body>
<tr>
<td>
Something
</td>
<td>
$anything
</td>
</tr>
</table>
</body>
</html>
EOD;
thanks a lot for your help..
I am total beginner in php, all my knowledge i glued from interne sources, so i realy dont have any theoretical background, no training, nothing..
i have maybe very simple problem for you. I have created a form with multiple checkboxes. it is showed here:
<form name="cezform" action="export.php" method="POST" onsubmit="return formvalidation(this)">
<b>Something </b><br>
<input type="checkbox" name="anything[]" value="pozvanky" checked> Pozvánky<br>
<input type="checkbox" name="anything[]" value="program" checked > Program <br>
<input type="checkbox" name="anything[]" value="etikety" checked> Etikety na víno
</form>
i use export.php for processing and also i want it to be exported in .csv file. so in my export I have this so far:
$tlacoviny = $_POST['tlacoviny']; I think this may look differently, because it doesnt call all the names...I really dont know..
this is how it is coded to be exported to .csv
$csv= <<<EOD
<html>
<head>
</head>
<body>
<tr>
<td>
Something
</td>
<td>
$anything
</td>
</tr>
</table>
</body>
</html>
EOD;
thanks a lot for your help..