Jump to content

need help


fert

Recommended Posts

[code]
if($_COOKIE[user]!="")
        {
            $file=@fopen ("_private/chat_users.txt","a");
            @fwrie ($file,$_COOKIE[user]);
            @fclose ($file);
        
            $file=@fopen ("_private/chat_users.txt","r");
            $users=@fread ($file,filesize("_private/chat_users.txt");
            @fclose ($file);
        }
        
        $file=@fopen ("_private/chat_text.txt","r";
        $text=@fread ($file,filesize("_private/chat_text.txt");
        @fclose ($file);
        
        echo "<p><textarea rows=20 name=people cols=15 readonly>\"{$users}\"</textarea>&nbsp;&nbsp;&nbsp;";
    echo "<textarea rows=20 name=text cols=61>\"{$text}\"</textarea></p>";
    echo "<p><textarea rows=3 name=post_text cols=64></textarea></p>";
    if($_COOKIE[user]!="")
    {
        echo "&nbsp;&nbsp;&nbsp;<input type=submit value=send>";
    }
    echo "<p><input type=button value=Reload Window onclick=window.location.reload()></p>";
[/code]
when i run the code all i get is a blank screen
Link to comment
https://forums.phpfreaks.com/topic/11691-need-help/
Share on other sites

[!--quoteo(post=382415:date=Jun 10 2006, 10:46 PM:name=Masna)--][div class=\'quotetop\']QUOTE(Masna @ Jun 10 2006, 10:46 PM) [snapback]382415[/snapback][/div][div class=\'quotemain\'][!--quotec--]
You have to use parenthesis for functions like fwrite.
[/quote]
There aren't any () because that's the only way the forums would let me post code
Link to comment
https://forums.phpfreaks.com/topic/11691-need-help/#findComment-44191
Share on other sites

[!--quoteo(post=382499:date=Jun 11 2006, 07:55 AM:name=joquius)--][div class=\'quotetop\']QUOTE(joquius @ Jun 11 2006, 07:55 AM) [snapback]382499[/snapback][/div][div class=\'quotemain\'][!--quotec--]
if($_COOKIE[user]!="")
{
echo "&nbsp;&nbsp;&nbsp;<input type=submit value=send>";
}
go for $_COOKIE['user'] instead, and if this doesn't help make sure the cookie is actually set as with no errors it could only be this
[/quote]
I tried this and this doesn't work
Link to comment
https://forums.phpfreaks.com/topic/11691-need-help/#findComment-44456
Share on other sites

  • 3 weeks later...
[!--quoteo(post=382413:date=Jun 10 2006, 09:42 PM:name=phpuesr1)--][div class=\'quotetop\']QUOTE(phpuesr1 @ Jun 10 2006, 09:42 PM) [snapback]382413[/snapback][/div][div class=\'quotemain\'][!--quotec--]
[code]
if($_COOKIE[user]!="")
{
$file=@fopen"_private/chat_users.txt","a";
@fwrie$file,$_COOKIE[user];
@fclose$file;

$file=@fopen"_private/chat_users.txt","r";
$users=@fread$file,filesize("_private/chat_users.txt");
@fclose($file);
}


[/quote]

Look at line 4. fwriTe needs to have a "t" in it.
Link to comment
https://forums.phpfreaks.com/topic/11691-need-help/#findComment-50011
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.