Jump to content

stuckwithcode

Members
  • Posts

    76
  • Joined

  • Last visited

    Never

Posts posted by stuckwithcode

  1. I have a script that uploads pictures to a folder.  I used mkdir to create this folder and sub folders.

     

    Do I need to chmod folders and files, do i need to do this to my other html, php and image files.

     

    I am completetly confused who is the owners group etc

     

    thanks

  2. Hello,

     

    I have a mysql table and when I populate it through php i have to insert blank values into fields if not it will not work.  How can I put the default value in phpmyadmin to be blank, but not null.  I dont understand the null checkbox or the default value option.  Please help not phpmyadmin guides found

  3. is this the best way to check if a server is live? 

     

    <?php

     

    $host = "www.google.com";

    $fp = fsockopen($host, 80, $errno, $errstr, 10);

     

    if($fp)

    {

    echo "yes it is";

    fclose($fp);

    }

    else

    {

    echo "no it is not";

    }

     

    ?>

     

    But if you type in a false server eg www.googddfsdfsd.com it returns an error how can i get it to return false and why doesn't it.

  4. thanks, why can i not put a variable in IN(), the code below does not work so i just put the variable in after doing the implode e.g.

     

    $result = mysql_query("SELECT * FROM tablename WHERE primarykey IN(".implode(",",$randoms).")");

     

    $randomslist = implode(",", $randoms);

     

     

    $result = mysql_query("SELECT * FROM tablename WHERE primarykey IN($randomslist)");

     

    Thanks, Im nearly there

  5. if I am using 1&1 as my web host can i just use php mail, how do i know if i need to use smtp authentication.  I've been looking at this for a while and am still stuck.  I am on 1&1 and want to send email through php is it easy?

     

    Thanks

  6. I am trying to randomly order a mysql table and then echo the results.  Why is it that everything I read about order by rand() says that It is too slow and not to use it.

     

    Can any help explain why or maybe offer up some other suggestions.  The table will have a lot of rows eventually

     

     

    Thanks

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