use file store infomation to string

$outputstring = $date.”\t”.$tireqty.”\t”.$oilqty.” oil\t”.$sparkty.” spark plugs\t\$”.$totalamount.”\t”.$address.”\n”;

@$fp = fopen(“DOCUMENT_ROOT/../orders/orders.txt”,’ab’);

flock($fp,LOCK_EX);
if(!$fp){
echo “<p><strong>Your order could not be process at this time. Please try again later.</strong></p></body></html>”;
exit;
}
fwrite($fp, $outputstring,strlen($outputstring));
flock($fp, LOCK_UN);
fclose($fp);

echo “<p>Order written.</p>”;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s