Jump to content

pluginbaby

Members
  • Posts

    37
  • Joined

  • Last visited

    Never

Everything posted by pluginbaby

  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?
  14. It works perfectly, only, my brother his pc and my pc are on the same network (wireless)and with him the IP shows the same as on my pc. Is there something that is different for every pc? And how can I get that? I want a unique value for every pc ;)
  15. Is there a PHP Function to get the IP from the users on my site?
  16. thank you, I appreciate your help, it works perfectly now  ;D
  17. I got a question: Imagine this table: id | number 1 | 1 2 | 2 3 | 3 4 | 2 5 | 6 now I make a select in php: $str = "select id from table X where number=2 limit 1"; $result=mysql_query($str) or die (mysql_error()); $line = mysql_fetch_row ($result); $id = $line[0]; when I do this, the database selects the first possible id where the number=2. What I want to do is make the database select a random id where the number=2. So it would response with id = 2 sometimes, and other times with id = 4 Is this possible?
  18. I did it without the 5th parameter. It works without it to. I set up an email address at my domain called: automailer@.... I also changed the subject of my email, maybe MSN sees "test" as a spam subject. Anyway, now it finally arrived. I tested a couple of times and it keeps working. Thank you all of you for helping me out on this one ;D
  19. Hmm, I must be doing something wrong then: [code]<?php $mailtos = "willem_sterckx2@hotmail.com"; $subject = "test"; $message = "this is a testingmessage"; $knownsender = "willem_sterckx2@hotmail.com"; if ($ccaddress=="" || $ccaddress==" "){ $header="From: $knownsender"; }else{ $header .="From: $knownsender\r\n"; $header .=" Cc: $ccaddress"; } // $header.="Bcc: $bcaddress"; if (@mail($mailtos, $subject, $message, $header)){ echo "Your Email has been sent."; }else{ echo "There was an error sending your Email"; } ?>[/code] This is the exact code I executed, but I didn't got any emails at my hotmail account, I was wondering, is the "$knownsender" correct?
  20. thank you, it would be wonderful if someone found a solution  ;D
  21. well, it does work. But not with a @hotmail adres. When I send it to my ...@yahoo.com it works. But when I send it at my ...@hotmail.com it doesn't work. What I want is that it works also on the @hotmail.com email address, cause the site where I want to use it for has a lot @hotmail.com email addresses, and if they can't recieve the email, there is no use of me creating this ;) I hope you understand my problem and there is a way of fixing it...
  22. sorry to dissapoint you but I still haven't got anything in my hotmail inbox or trash can. I think there must be a way of doing it, cause if you register on a forum, you get an email too if you are using a hotmail account. Anyone has some more ideas?
  23. okay, I have added the 5th parameter: [code]<?php $to      = 'willem_sterckx@hotmail.com'; $subject = 'test'; $message = 'hello'; $headers = 'From: superadmin@billshakesphere.de'; $p5  = '-f superadmin@billshakesphere.de'; if (mail($to,$subject,$msg,$headers,$p5)) echo "email send"; ?>[/code] But when I runned it, I got this error: [quote]Warning: mail() [function.mail]: SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE. in /srv/www/htdocs/web34/html/test.php on line 8[/quote] What can I do about that then?
×
×
  • 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.