开发者

how can i make an interface in php to add data csv file

开发者 https://www.devze.com 2023-02-01 01:51 出处:网络
hey...i need to create a html+php+javascript interface where i got three text areaand i want:::: that if i\'ll enter some data into text area and pressing submit button,,then it\'ll enter that texta

hey...i need to create a html+php+javascript interface

where i got three text area and i want::::

that if i'll enter some data into text area and pressing submit button,,then it'll enter that textarea's data into a csv file..

pls some one help.开发者_开发问答...


<?php

$list = arrary(); 
//your array will have all the fields from the form, textfields and textareas

$fp = fopen('output.csv', 'w');

foreach ($list as $fields) {
    fputcsv($fp, $fields);
}

fclose($fp);
?>


$fp = fopen('file.csv', 'w'); fputcsv($fp, $_GET['TextArea']); fclose($fp);

?>

0

精彩评论

暂无评论...
验证码 换一张
取 消