Jump to content

jwk811

Members
  • Posts

    714
  • Joined

  • Last visited

    Never

Posts posted by jwk811

  1. $pic = $_FILES['photo'];
    
    	$ext = substr(strrchr($pic['name'], "."), 1); 
    	$imagePath = md5(rand() * time()) . ".$ext";
    
    $target = "images/";
    $target = $target . $imagePath;
    
    
    move_uploaded_file($pic['tmp_name'], $target);

     

     

    It works for me and I don't think it's the extension because it's always .jpg and it works for me. I just don't get what could be happening. It worked before perfectly until I changed things around but it's still the SAME! And the directory has just the same permissions as the last one when it worked.

  2. most of the time it works but then a few people couldnt get their photos to upload. im stumped. i think it has something to do with the extension in capital letters instead. but i tried a photo like that and it worked fine. ahhh help please

     

    $pic = $_FILES['photo'];
    
    	$ext = substr(strrchr($pic['name'], "."), 1); 
    	$imagePath = md5(rand() * time()) . ".$ext";
    
    $target = "images/";
    $target = $target . $imagePath;
    
    
    move_uploaded_file($pic['tmp_name'], $target);
    

  3. theres a table called

    forum_posts

    and another called

    forum_category

     

    can i select all posts that are in forum_category but only the categories in the parent category

     

    $sql = "SELECT cat_id FROM forum_category WHERE cat_parent_id = '$cat_parent_id'";

    $result = dbQuery($sql);

     

    then select all post from each of those category and add them up.

     

    is there an easier way to do this whole category thing its driving me crazy, thanks

  4. all of a sudden. it was just working yesterday and i havent changed ANYTHING and today it wont connect. so its not the code but i can log on to phpmyadmin so i have no idea. just wondering if anyone knows what the possibilities of this problem could be

×
×
  • 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.