chrules Posted September 14, 2009 Share Posted September 14, 2009 Hi, i have a kind of blog like feature on my site, and i store the text in a seperate .txt file. I have been searching for a way to make so that if "Button1" pressed $myFile = "text1.txt"; $fh = fopen($myFile, 'r'); $theData = fread($fh, filesize($myFile)); fclose($fh); echo $theData; if "Button2" pressed $myFile = "text2.txt"; $fh = fopen($myFile, 'r'); $theData = fread($fh, filesize($myFile)); fclose($fh); echo $theData; and so on.. is there any easy way to do this? any help appreciated .. Link to comment https://forums.phpfreaks.com/topic/174205-if-statement-to-show-different-txt-files/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.