Jump to content

Fluf

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Contact Methods

Profile Information

  • Gender
    Not Telling

Fluf's Achievements

Member

Member (2/5)

0

Reputation

  1. There is not difference, what i would use lol $query = mysql_query("SELECT COUNT(id) FROM LOGIN WHERE username='$username' AND password='$password'"); $row = mysql_fetch_row($query); When i write print_r($row[0]) and i submit only username it says 1, but shouldn't it say 0??
  2. $query = mysql_query("SELECT COUNT(id) FROM LOGIN WHERE username='$username' AND password='$password'"); $row = mysql_fetch_row($query); if($row[0] != 1) { echo "Invalid username/password"; } else if($row[0] == 1) { echo "Welcome."; So when it finds from database username and password what matches then row[0] value should be 1 right? But it already gives the value 1 when i only enter username and press login or try it with some random password..
  3. Question is, why can't i use $config['conf'] variable in class? It gives me following error Parse error: syntax error, unexpected '[', expecting ',' or ';' in /usr/local/apache/htdocs/class/file.php on line 4 It works if i don't put it in class, but i need it in there.. <?php class test { public $config['conf'] = "server"; function man() { $this->config['conf'] = "localhost"; return $this->config['conf']; } } $new = new test(); echo $new->man(); ?>
  4. http://www.tizag.com/phpT/filecreate.php Try this one
  5. Fluf

    chmod in linux

    It's not apache fault, i know how chmod works and stuff, but this thing what i want just don't work. 1 for execute, 4 - read, 2-write and i what i want is something like this. 750, normal user has no access to this folder, but with browser you can get access to this folder.
  6. Fluf

    chmod in linux

    But there are other solutions too..i would like to know :/
  7. Fluf

    chmod in linux

    Well i have this folder access to user nobody which is apache user with command chown -R nobody data/ still it says forbidden when i try to access with browser and chmod is 750
  8. Fluf

    chmod in linux

    The thing is I have several users in my slackware box and i'm running websiste too in this box. But i can't find a right chmod for protecting some folders and files.All i want to do is this. protect folder data/ from normal users, only root can enter in there, but i want that everybody is able to get in this folder via browser, not to view files, but to see the front page..
  9. Okey, i know now what's wrong..i saved this file in wrong place all the time and my script used the old file:D
  10. Do i miss something?? function mysql_conn($host,$username,$password,$db) { mysql_connect($host,$username,$password); mysql_select_db($db); } mysql_conn("localhost","user","password","dbname"); And when i try to use mysql_query then mysql_error() keeps telling me no database selected, i even made a whole new function for mysql_select_db, didn't work..i keep asking myself, why???
  11. Hi, I have a lil problem. How can I use function in function like this function check() { echo "Fluf"; } function echo_data() { echo "My name is "; check(); // and then it should echo the name.. } Is it even possible in php5?
  12. Hi. For example I compare two values and if those values match then script should take another value from array and then echo it.I just need do know how do skip saying the variable value when they match.Hope someone gets what i need. It's like script for learning new words in other languages and when he asks me a new words, then i don't want to see those words come around...
  13. Hi. The problem is that i want to take text from file called "list.txt" with fopen and then to put this text info array. something like this $fopen = fopen("list.txt","r"); $arr[] = $fopen; $count = count($arr); for($i=0;$i<=$count;$i++){ bla bla.. but this doesn't work, because i don't know how to make this $fopen to array. Thank-you.
  14. Hi. Made a simple php bot what is able to response, when i say !quit, but the problems is that everybody can execute this command. How can i make a check for it? if($nick == "Fluf" && stripos($line,"PRIVMSG ".$chan." :!quit\r\n)>0){ then bla bla How do make this $nick?
×
×
  • 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.