fert Posted June 11, 2006 Share Posted June 11, 2006 [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> "; 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 " <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 More sharing options...
Masna Posted June 11, 2006 Share Posted June 11, 2006 You have to use parenthesis for functions like fwrite. Link to comment https://forums.phpfreaks.com/topic/11691-need-help/#findComment-44189 Share on other sites More sharing options...
fert Posted June 11, 2006 Author Share Posted June 11, 2006 [!--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 More sharing options...
Barand Posted June 11, 2006 Share Posted June 11, 2006 I'd start by removing those @'s from all the function calls so you can see if any errors are reported Link to comment https://forums.phpfreaks.com/topic/11691-need-help/#findComment-44256 Share on other sites More sharing options...
joquius Posted June 11, 2006 Share Posted June 11, 2006 if($_COOKIE[user]!="") { echo " <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 Link to comment https://forums.phpfreaks.com/topic/11691-need-help/#findComment-44270 Share on other sites More sharing options...
fert Posted June 11, 2006 Author Share Posted June 11, 2006 [!--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 " <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 More sharing options...
nineninefour Posted June 27, 2006 Share Posted June 27, 2006 [!--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 More sharing options...
wildteen88 Posted June 27, 2006 Share Posted June 27, 2006 Plase note when posting functions, place a space between the function name and the opening parenthesis, like so:[code]fopen (... blah ...);[/code]Whenyou do that the forum will allow you to post. Link to comment https://forums.phpfreaks.com/topic/11691-need-help/#findComment-50012 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.