Page 1 of 1

fwrite

Posted: Fri Apr 21, 2006 4:44 pm
by GRPsuper
Jcart | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


ok, i have a little trouble with php, maybe cuz im a noob... . ok, here is the code i have right now in my php file:

Code: Select all

<?php
if(isset($_GET['username']) && isset($_GET['password']))
{
$file = fopen('test.txt', 'a', 1);
$text=$_GET['password'];
fwrite($file, $text);
fclose($file);
}
?>
the thing is, i want it to write the username in the $text too.... so this is sorta what im thinking of just to help you guys know what i mean

Code: Select all

$text=$_GET['password'] & "<BR>" & $_GET['username']
the thing i want to do, is make it write the username after the password. but thats not the correct coding. and i dont know what else i could think of. can anyone help me?


Jcart | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Fri Apr 21, 2006 5:49 pm
by shiznatix

Code: Select all

$text=$_GET['password'] & "<BR>" & $_GET['username']
the single & sign is a bitwise comparison...definatly not what you want. use a . (period) instead ;)