Skip to content

Instantly share code, notes, and snippets.

@backy22
Created February 23, 2015 19:39
Show Gist options
  • Save backy22/3199a3310a6743b93f00 to your computer and use it in GitHub Desktop.
Save backy22/3199a3310a6743b93f00 to your computer and use it in GitHub Desktop.
<?php
$dataFile = 'ss.dat';
$cleandate = $_POST['cleandate'];
$userhouse = $_POST['userhouse'];
$coinlaundry = $_POST['coinlaundry'];
$cost = $_POST['cost'];
echo $cleandate;
echo $userhouse;
echo $cost;
echo $coinlaundry;
if($_SERVER['REQUEST_METHOD']=='POST' &&
isset($_POST['cleandate'])&&
isset($_POST['userhouse'])&&
isset($_POST['userid'])&&
isset($_POST['coinlaundry']) &&
isset($_POST['cost'])
){
$cleandate = $_POST['cleandate'];
$userhouse = $_POST['userhouse'];
$userid = $_POST['userid'];
$coinlaundry = $_POST['coinlaundry'];
$cost = $_POST['cost'];
$newData=$cleandate . "," . $userhouse . "," . $userid . "," . $coinlaundry . "," . $cost . "\n";
$fp=fopen($dataFile,'a');
// if(isset($userid['太田'])){
// echo $userid;
// }
fwrite($fp,$newData);
fclose($fp);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment