Jump to content

pluginbaby

Members
  • Posts

    37
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

pluginbaby's Achievements

Member

Member (2/5)

0

Reputation

  1. thanks a lot, it works perfectly
  2. hi I want to select the record out of a table with the highest time (MAX(time)) and I want to get the username from that record. This should only be records where ctId=0. I first tried: SELECT MAX(time),username FROM table WHERE ctId=0 but that gave me a grouping error then I did some research about groups and stuff, since I didn't know that much about them, and I tried: SELECT max(time),username,ctId FROM table GROUP BY username,ctId HAVING ctId=0 AND MAX(time) But that gives me not the record with the highest time... :-\ You have any idea what I am doing wrong? Thank you in advance edit: I made a typo in the code
  3. thanks for the help I works perfect now. Your solution of printing it was so simple, stupid not to think of it haha ;D ;D anyway, nice job helping me greettzz I love you PHP Freaks
  4. thanks for the help but it was no use, it didn't work. I also tried them all alone with the others (aka: gif without jpg and jpeg; jpeg without gif and jpg ... ) And still only gif works. I think it is weird, anyone any suggestions? ;D
  5. [code]<?php if (($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/jpg") && ($_FILES["file"]["size"] < 64000))   { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br />"; echo "Type: " . $_FILES["file"]["type"] . "<br />"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";    if (file_exists("upload/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file"]["name"]; } } } else { echo "Invalid file"; } ?>[/code] here is my test code to upload a file, later it needs more working out :) But I got basic, and when I tested, I succesfully uploaded a .gif file (whoohoow), but when I tried a .jpg or a .jpeg, it displayed "Invalid file". How can this be helped (better: can this be helped? :) )
  6. thank you I never thought of that easy solution, I feel so dumb  ;D ;D
  7. Hi, I want to allow only a-z,A-Z,0-9 in a username when anyone registers on my website, all other characters are not allowed, but I can't find a function to check it. Maybe I'm overlooking a function or so. Can someone help me?
  8. thanks, it works perfectly now ;D
  9. I made an input form, but when people write some characters in there like " or ', this can cause me trouble with making sql commands. I looked for a function to remove some characters, but didn't found one. Is there a function which removes a charater you want to be removed like: you want no a in your string, and you use this function then and strips all a's from your function but leaves the rest there
  10. Is there a way or a function we can use to see which website we are coming from (url)? There are some pages on my website I only want people to see if they come from my website ;)
  11. $blabla is an array, like: $blabla[0]=haha $blabla[1]=hihi ... now, is there a function wich I can use to clear the whole array in one time? so when I use the function, $blabla[0] is empty and also $blabla[1] and so on, in stead of clearing them one by one like: $blabla[0]=""; $blabla[1]=""; ... is this possible or not?
  12. [code]<?php $ip=$_SERVER['REMOTE_ADDR']; // insert in db // select from db all players with that id // if there is more then 1 players with the same IP => set multi status +1 if (empty($_COOKIE['cookie_user'])) { setcookie("cookie_user","$username",Time()+604800); } if ($_COOKIE['cookie_user'] != $username) { //update multi status: +1 } // if multi status = 6, send admin a message with the user beeing spotted for multiing ?>[/code] I came up with a basic idea, does this look good?
  13. I want to prevent that someone has more then 1 account on 1 pc. ;D Any idea how?
×
×
  • 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.