Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(isset($_POST['username'])) $username = $_POST['username'];
- if(isset($_POST['password'])) $password = $_POST['password'];
- if(isset($_POST['action'])) $action = $_POST['action'];
- if(isset($action)) {
- switch($action) {
- case 'ADD':
- $file = 'testdata.txt';
- $file = fopen($file, 'a') or die('cant open file');
- fwrite($file, $username . ' ' . $password . chr(13));
- fclose($file);
- return '111';
- break;
- default:
- echo '<p>' . $action . '</p>';
- echo '<p>' . $username . '</p>';
- echo '<p>' . $password . '</p>';
- break;
- }
- }
Add Comment
Please, Sign In to add comment