Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.