Jump to content

Match $var in text file ?


Recommended Posts

Good day to you all,

          stupid as it sound, all the thing that I have tried to match a variable into a text file and execute according to it result.

 

 


$active = "user_list.txt";
$pos = strpos($active, $_SESSION['username']);
if ($pos === false) {
echo "<b id=\"userinfo\"><img src=\"enligne.png\" valign=\"bottom\" width=\"13px\"/></b>";
} else {
echo "<b id=\"userinfo\"><img src=\"horsligne.png\" valign=\"bottom\" width=\"13px\"/></b>";
} 


 

 

Thanks !

 

Link to comment
https://forums.phpfreaks.com/topic/164406-match-var-in-text-file/
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.