Jump to content

john_6767

Members
  • Posts

    99
  • Joined

  • Last visited

    Never

Posts posted by john_6767

  1. I used to have a line in my .htaccess file that over rode the 2mb limit (php_value upload_max_filesize 10M).

    But recently my server (jumba.com.au) has introduced something new which won't let this work. I get the following error:

     

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, webmaster@domain.com.au and inform them of the time the error occurred, and anything you might have done that may have caused the error.

     

    More information about this error may be available in the server error log.

     

     

    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

     

     

    Is there another way to up this file upload limit or should i look at different servers? I know I can ask the server guys but they haven't been very helpful in the past.

  2. From my understanding, he does want the numbers to decrease when he deletes a record.

     

    Say he has 5 records in the DB. (1,2,3,4,5).

     

    If he deletes record #3 he would want record #4 to become the new record #3, then record #5 to become #4. So now he ends up with 4 rows in the DB since he deleted one, and they are numbered 1,2,3,4 instead of 1,2,4,5.

     

    If I'm wrong about that, let me know. But I already said that I don't think he should be worried about that.

     

    cheers, thats correct

  3. pocobueno1388 - its not online yet, but here's an example. Sounds like your onto what i'm after,

     

    I have a photo gallery, with 2 fields, (ID, file, caption) I would like to add another field 'order' and then sort by order in the photo gallery so the photo with number 1 is first 2 is second etc...

     

    For the backend.

    I have all the records display in a table, each record as a row. I would like to add a drop and drag using javascript with php that fires when it is dropped to make the update.

     

    If this is not possible a simple up link and a down link for every record would suffice.

  4. Thanks for your quick reply,

     

    I don't want to change the pk and i am after a server side (php) script to do this,

     

    i would like to have a seperate field for 'order by' so the user can choose the order of records, i.e. like for a photo gallery the user can choose which photos are displayed before others without having to put them into the gallery, i have seen this done before but can't figure it out.. i assume its common practise and there are php scripts out there for it..  

     

    it involves something like,

     

    change current record from 'oldValue' to 'newValue'

       if another record has 'newValue' then change new record etc...

     

  5. I would like to implement a column in my mysql database that allows me to sort my records by this column. I assume that numbers is the best way to go, (ie orders are 1,2,3,4,5 and i can sort by order ascending).

     

    My question is in regards to maintaining this column as if i delete a record in the middle of the order i would have to move every order number that is higher down a number so there isn't a gap in numbers. And to update i would have to move all the other records around this record which are effected by the change.

     

    Is this the way to approach this problem, is there a better way or can you point me towards some script to do this..

  6. cheers, i have just got this to work, its a bit messy, but incase it helps anyone else.. i'll now go check that link out and see if theres a better way to do it..
    [code]
      <?php
      $DateParam = date("Y");
      $yearsBetween = $DateParam - 2000;
     
    $i=0;
    echo "<select name=\"start_date\" id=\"start_date\" class=\"formDropDown\"/>";
    while($i<=$yearsBetween)
      {
      $yearVar = 2000 + $i;
      echo "<option value=\"" .$yearVar ."\">".$yearVar ."</option>";
      $i++;
      }
    ?>
    <option value="<?php echo date("Y") + 1 ?>"><?php echo date("Y") + 1 ?></option>
    <option value="<?php echo date("Y") + 2 ?>"><?php echo date("Y") + 2 ?></option>
    </select>
    [/code]
  7. i'm trying to fill a drop down with the years from year 2000 to two years ahead of the current year, ie for this year there would be the values: 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009 as options in the drop down and then next year 2010 would appear..

    i have been using the following code to display from two years back to one year ahead but cannot see how i can go from the year 2000 widthout having to update the code every year..

    maybe someone can show me how to get the current year minus the year 2000 then loop through adding every year between?

    [code]<select name="start_date" id="start_date" class="formDropDown"/>
    <option value="<?php echo date("Y") - 2 ?>"><?php echo date("Y") - 2 ?></option>
    <option value="<?php echo date("Y") - 1 ?>"><?php echo date("Y") - 1 ?></option>
    <option value="<?php echo date("Y")?>"><?php echo date("Y") ?></option>
    <option value="<?php echo date("Y") + 1 ?>"><?php echo date("Y") + 1 ?></option>
    </select>[/code]
×
×
  • 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.