Jump to content

dannyb785

Members
  • Posts

    544
  • Joined

  • Last visited

Posts posted by dannyb785

  1. Dont make files with 2 dots. Not a good idea. just make it form1inc.php. Not saying thats the answer, but it'll get you out of trouble in the future.

     

     

    Also...

     

    someone should respond please

     

    isn't the right way to approach a FREE forum for php help. Especially since it's only been a day and a half since you posted it. Have patience.

  2. Technically, the image is never uploaded until after it has been checked. The way you asked the question was as if the image is uploaded and THEN the file type is checked. Is it just giving you an error no matter what? Or can you give an example of the issue you run into?

  3. You could also record images uploaded in a database. Then just do a mysql query for all images(or just the ones you want) and then

     

    $n = 0;

    while($row = mysql_fetch_assoc($result))

    {

      extract($row);

      echo "<img src=$image_file_location height=200 width=200>";

      $n++;

      if($n == 5)

      {

        echo "<br>\n";

        $n = 0;

      }

     

    }

     

    something like that

  4. Your setup confuses me...

     

    when you put

    `POSTS` - TABLE
    
    ID      TITLE     MEMBERID
    2       Holiday   4
    3       Travel    3
    4       Boats     4

     

    but in the table above it, travel's memberid was 9. Also, you said you're looking for 1/3/4(in your example) and you have 4/3/4 listed as the results you expect to get.

  5. Can you please give an example of what you might be putting into the column? With mediumtext, I dont believe you have to specify a length.

     

    But I think what your problem is, is the way you have serialized to be inserted.

     

    '". $sqlinput ."' Is weird. Even if it may be correct by php standards(I never do it, but I dont wanna say its invalid syntax), you generally only want to have the 2 single quotes on both sides of the variable. And I dunno why you have the dots on both sides also. So make it:

     

    "$sqlinput"

     

    And that should work.

  6. provided you have the date in raw format(strtotime format), you can do either..

     

    I have a get_midnight function which basically gets the day today and calculates the exact second that midght today hit and then I do a query for everything with a date greater than that value. That'd give you everthing that was done today.

     

    Hope that helped  :)

     

     

     

    Edit: here's the get_midnight function..

     

    function get_midnight($timestamp)

    {

      $day = date("j", $timestamp);

      $month = date("F", $timestamp);

      $year = date("Y", $timestamp);

     

      $midnight = strtotime("$month $day $year");

     

      return $midnight;

    }

  7. What does an "image" row look like?

     

    Name  img_name

    Size (Bytes)  img_size

    Type (JPG,GIF) img_type

    File History  img_filehistory

    Brown Hair  img_brownhair 

     

     

    Now I have this.....

     

    $result = mysql_query("SELECT * FROM image");

     

    while($row = mysql_fetch_array($result))

     

       

    if($row['checked']==1) {

        $checked = "checked";

    } else {

        $checked = "";

    }

    echo "<input name=\"image[$row['img_brownhair]\" type=\"checkbox\" value=\"true\" $checked >"

     

     

     

    and I get an error on the last line (the echo) 

    T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

     

    it works if I do this :

    I took out the ' in the [img_brownhair] and added a ; at the end of the echo, although if img_brownhair already equalled "1" (checked) it doesn't show up checked.

     

    Get rid of the first single quote where it says img_brownhair and it should work

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