Jump to content

AndyB

Staff Alumni
  • Posts

    5,465
  • Joined

  • Last visited

    Never

Posts posted by AndyB

  1. Then input_select($row['article_id'], $defaults, $live) must be doing some really creative stuff (including generating code that jumps out of where it belongs).  I'm skeptical that your posted code produces the output you claim, because that just doen't seem rational. If you echo something between TD tags, that's where it stays.

  2. Do anybody else have a suggestion?

     

    Sure. When you get a white page, view the html source and post exactly what you see.

     

    If that doesn't do it, then turn on php error trapping and error display. You can google both those for methods, or check the php online manual.

     

    Hint:

     

    <?php
    ini_set ("display_errors", "1");
    error_reporting(E_ALL);

     

    It's hard for us to help you through an error (or more) when you tell us you have an error in line X and leave us to guess which is line X and/or when all we see is 4 or 5 lines of a larger script.

  3. Just a general comment as follow-up.  I'm not sure how the invoices actually look, but I suspect that if I sent a client an invoice claiming I'd worked 11 minutes and 13 seconds on his project he might think he was being 'nickel and dimed'. Accumulating time charged to a project on a daily basis and rounded to the nearest 15 minutes would be a 'friendlier' approach.

     

    $20/year looks like a pretty minimal amount which would pay back if the system allowed a user to capture half an hour over a year that they otherwise forget.  I find myself doing a lot of odds and ends for one client - a few minutes here, a few minutes there and at the end of the month I 'invent a round number' based on how many emails he sent and fire off an invoice.  I probably under-bill him and your system would help .... as long as I remembered to turn off the timer when I skipped out to the washroom or checked a favourite web site when I was supposed to be working.

  4. Couple of quick/random comments.

     

    The timer does not reset after time is allocated to a job. It's possible to leave the timer running and then bill the increased time to a different job. I know we all multi-task, but ...

     

    I'd move the 'cancel' icon in template editing up to the top of the scrollable area (sad to say, it took me too long to work out how to exit from template editing).

     

    I really don't like having content forced into a scrollable area when it could just as easily have been displayed so I scroll the page to see what's below the fold.

     

    Where's the "Help, I can't remember how to" icon?

  5. Try this:

     

    <?php
                        $result = mysql_query("SELECT * FROM subjects ORDER BY position ASC",$connection);
                        if(!$result){
                        die("subject query failed: ". mysql_error());
                        }
                        while($row = mysql_fetch_array($result)){
                            echo "<li>{$row["menu_name"]}</li>";
                            $result2 = mysql_query("SELECT * FROM pages WHERE subject_id={$row["id"]}
                            ORDER BY position ASC",$connection);
                            echo "<ul>";
                            while($row2 = mysql_fetch_array($result2)){
                              echo "<li>{$row2["menu_name"]}</li>";
                            }
                            echo "</ul>";
                        }
                    ?>

     

    Then $result and $row will no longer be confused in the two queries.

  6. News to me that any array variable needs braces. Guess I should change all my code  :-\

     

    Alternatively:

     

    echo "<tr><td><input type='text' name='name' value='". $_SESSION['name']. "'></td><td><input type='text' name='email'></td></tr>";

     

    @phatgreenbuds - not even CSS is powerful enough to fix php syntax errors!!

  7. I don't know what overall_header.html is supposed to do. Neither colours.css nor common.css are loaded based on the viewed source of your page, so who knows what role they play (apparently none).  Best guess is that one or more of the used CSS files have a relatively link path to your image that doesn't match where the image actually exists.

  8. I use this at the page start:

     

    $starttime = explode(' ', microtime());
    $starttime = (float)$starttime[1] + (float)$starttime[0];
    

     

    and this at the page end:

     

    $endtime = explode(' ', microtime());
    $endtime = (float)$endtime[1] + (float)$endtime[0];
    $totaltime = number_format(($endtime - $starttime), 3, '.', '');
    echo "<p>My server generated this page in $totaltime seconds</p>";

     

    Does that help?

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