include("chkrdir.inc"); // chkrdir.inc will either // set global variable $existingSession to our sessionkey // or, if no session key found, redirect the user. function recordorder($item) { global $fp; $coded = urlencode($item) . "\n"; fwrite($fp,$coded); } function process($data) { if(!isset($data)) return; if(!is_array($data)) return; if(empty($data)) return; foreach($data as $val) recordorder($val); } $computers = $HTTP_POST_VARS["computers"]; $books = $HTTP_POST_VARS["books"]; $furniture = $HTTP_POST_VARS["furniture"]; $filename = "./orders/" . $existingSession; $fp = fopen($filename, "a"); process($computers); process($books); process($furniture); fclose($fp); ?>
You may continue shopping or proceed to checkout.
Want to work for us?