Jump to content

ober

Staff Alumni
  • Posts

    5,327
  • Joined

  • Last visited

Posts posted by ober

  1. Did you create the XML file?

    Have you looked through the PHP manual on XML DOM?

    Explain "Dynamic" in terms of how you mean it. Do you want a page that updates itself periodically if someone is watching it, or a page that reads from the file automatically?
  2. Have them do it the first time (hell, store it as an input when they run your initial install script) and then just fill in the form for the update with the details. If the details change, just update the settings. That way, they only have to enter it once, but it gives them access to change it as needed.
  3. That's because mysql_query is going to return the result set number.

    You really need to stop nesting your functions so you can troubleshoot more easily:

    [code]$query = "INSERT INTO `$compl` ( `Name` , `Sail Number` , `Class` , `Score` ) VALUES ( '$name', '$snum', '$boattype', '$score')";
    $result = mysql_query($query) or die(mysql_error());
    if($result && mysql_num_rows($result) > 0)
    {
       $row = mysql_fetch_array($result);
    }
    [/code]

    That's how it should be structured. Then you can echo the query quite easily.
  4. To use your current method, you would have to call $row = mysql_fetch_array($result) between every < td >. To do it correctly, you need to have a column count, and your containing row would be closed when your column count == 3. That way, you call your main chunk of code that holds the item only once within the loop.

    I don't know if that makes sense, but it's hard for me to tell what it's currently doing.
  5. If your host allows you to setup multiple FTP accounts, I don't see how having your "secondary" FTP account info on his server would be a problem. You could setup a subdomain on your hosting or a seperate area where the secondary FTP can only access that area.

    I wouldn't keep his info on your site, but I'd have no problem keeping "update ftp info" on his site.
  6. [code]$sql2="SELECT * FROM clan_members WHERE Gamer_Tag='" . $_REQUEST['Gamer_Tag'] . "'"; [/code]

    I should also add that $_REQUEST is the global array that holds the $_GET and $_POST data... $_GET would hold the data you're passing, $_POST would hold data posted from a form that uses the POST method.... just to give you a little background info. ;-)
  7. I'm not exactly sure what you're asking, as your english isn't that great, but if you want to get a formatted string from the database, you have to use the date() function with a time/date format:

    [code]$login_time = date("n/j/Y h:i:s A", strtotime($row["login_time"])); [/code]
  8. Look, if your users like it, you're ok with it, and there are no functional problems, why listen to a bunch of web designers who may not have a clue about what makes a website look good?

    It's all about your opinion. You can agree or disagree with us. You're never going to make everyone happy.

    I'll email you a screenshot.
  9. I have to agree. It's pretty bad.

    It's extremely dark, your contrast between your text color and the background isn't strong enough, you have no hover effects on the nav or elsewhere, and your "reds" don't even match across the site, unless my eyes are playing tricks on me.

    I do like the logo, but the rest of the site needs a serious overhaul.
  10. Your || should be an &&.

    Well let's just go full out and list both ;-)

    [code]
    $comment_lines = 0;
    $code_lines = 0;
    foreach (glob("*.php") as $filename) {
        $thefile = file($filename);
        foreach($thefile as $key => $val){
            if(trim($val) != '' && substr(trim($val),0,2) != "//" && substr(trim($val),0,2) != "/*")
                $code_lines++;
            if(trim($val) != '' && (substr(trim($val),0,2) == "//" || substr(trim($val),0,2) == "/*"))
                $comment_lines++;
        }
    }
    echo "Lines of code: $code_lines<br/>";
    echo "Lines of comments: $comment_lines<br/>";
    [/code]

    And we could get more tricky with it... look for lines that have series of "========", "---------", etc... and you could single out full comment blocks as well, looking for the beginning and ending /* */

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